I need c style loop for:
for( int i = 0; i < n; i++ )
There’s equivalent i’ve found, but when iterating with big number of iterations, it consumes a lot of memory.
for i in range( 0, n ):
Is there any other equivalent?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use xrange instead of range, which uses a generator instead of building a whole list.