What’s the differences between these two pieces of code ?
Piet van Oostrum
piet at vanoostrum.org
Sun Sep 9 14:29:57 EDT 2012
More information about the Python-list mailing list
Sun Sep 9 14:29:57 EDT 2012
- Previous message (by thread): Re: What’s the differences between these two pieces of code ?
- Next message (by thread): Newbie: where's the new python gone?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
iMath <redstone-cold at 163.com> writes: > What’s the differences between these two pieces of code ? > (1) > for i in range(1, 7): > print(2 * i, end=' ') > > > (2) > for i in range(1, 7): > print(2 * i, end=' ') > print() > > > when executed both respectively in Python shell ,I get the same effect . Who can tell me why ? The first one gives a syntax error (IndentationError: expected an indented block) -- Piet van Oostrum <piet at vanoostrum.org> WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4]
- Previous message (by thread): Re: What’s the differences between these two pieces of code ?
- Next message (by thread): Newbie: where's the new python gone?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list