Begniner Question

Robert Kern rkern at ucsd.edu
Tue Mar 22 08:46:17 CET 2005


Glen wrote:
> #!/usr/local/bin/python
> 
> 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"
> else:
>    pass
> 
> if int(choice)==2:
> else:
>    pass

You need something between the if: and the else: lines.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the Python-list mailing list