onurb at xiludom.gro
Tue Mar 22 10:54:10 CET 2005
> import sys
> print "1.\tDo Something"
> print "2.\tDo Something"
> print "3.\tDo Something"
> print "4.\tDo Something"
> print "5.\tDo Something"
> print "6.\tExit"
> choice=raw_input("Please Enter Choice: ")
> if int(choice)==1:
> print "Here"
> if int(choice)==2:
> File "./Code.py", line 20
> IndentationError: expeted an indented block
> What am I doing wrong?
Err... I'm not totally sure, but I think it could be possible that you
perhaps should insert an indented block between lines 19 and 20 !-)
You're welcome !-)
A bit more seriously, now... the construct:
is syntactically incorrect. Python expects an indented block between the
'if' line and the 'else' line. If you don't have the needed code yet,
you need to put a 'pass' here :
This will of course do nothing else than useless tests, but it will at
least satisfy the language's rules.
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list