>>> i = 5
>>> j = 7
>>> if i <= j:
...     print 'nudge', 'nudge'
... else:
...     print 'whatever'
...
nudge nudge
>>>


WM. wrote:
 >>> i = 5
 >>> j = 7
 >>> if i <= j:
    print 'nudge, nudge'
          else:
File "<pyshell#8>", line 3
    else:
   ^
IndentationError: unexpected indent

Running in IDLE, all is well until "else:". IDLE seems perplexed about the >>>s. I try to de-dent else via the backspace key, after that there is no way to avoid an error message.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to