Executing Multiple Lines in Python
Posted
by metashockwave
on Stack Overflow
See other posts from Stack Overflow
or by metashockwave
Published on 2010-05-19T07:13:54Z
Indexed on
2010/05/19
7:20 UTC
Read the original article
Hit count: 220
python
When Python is first installed, the default setting executes users' code input line-by-line. But sometimes I need to write programs that executes multiple lines at once. Is there a setting in Python where I can change the code execution to one block at once? Thanks
if (n/2) * 2 == n:; print 'Even'; else: print 'Odd'
SyntaxError: invalid syntax
When I tried to run the above code, I got an invalid syntax error on ELSE
© Stack Overflow or respective owner