Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • It's a while loop, I am searching for for loop. Commented Jun 22, 2018 at 4:24
  • 1
    Why do you need a for loop? Commented Jun 22, 2018 at 4:30
  • I have C++ background, that's why I am searching for something like C++. You can say it curiosity. Commented Jun 22, 2018 at 4:31
  • If you have a C++ background, think about it this way: how would you write an infinite range for loop in C++? That's much closer to what Python's for loop is than the C-style for loop. Commented Jun 22, 2018 at 4:34
  • yeah, nice point to notice. thanks Commented Jun 22, 2018 at 4:35