I noticed that they behave similarly in the way that...
# Python
for i in range(10):
print x
is equivalent to
// C++
for(i = 0; i < 10; i++)
cout << x << endl;
... but I was wondering how something like...
# Python
for line in infile.readlines():
# [...]
... or...
# Python
import string
for numStr in string.split(inString):
# [...]
... is possible. I'm having a hard time wrapping my head around this.

New Topic/Question
Reply



MultiQuote





|