Begniner Question

Mikael Olofsson mikael at isy.liu.se
Tue Mar 22 02:46:01 EST 2005


"Glen" <kgl1 at tpg.com.au> wrote in message news:423fc58b at dnews.tpgi.com.au...
> if int(choice)==2:
> else:
>   pass
>
> File "./Code.py", line 20
>   else:
>      ^
> IndentationError: expeted an indented block
>
> What am I doing wrong?

As the error trace informs you, Python expexts an indented block. You need 
to put something between if and else, at least a pass.

Regards

-- 
/Mikael Olofsson
Universitetslektor (Senior Lecturer [BrE], Associate Professor [AmE])
Linköpings universitet

-----------------------------------------------------------------------
E-Mail:  mikael at isy.liu.se
WWW:     http://www.dtr.isy.liu.se/en/staff/mikael
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
-----------------------------------------------------------------------
Linköpings kammarkör: www.kammarkoren.com   Vi söker tenorer och basar! 




More information about the Python-list mailing list