[Tutor] Number Coercion: I swear, I never laid a hand on it!

Sean 'Shaleh' Perry shalehperry@home.com
Wed, 24 Oct 2001 10:04:40 -0700 (PDT)


> 
> if menu_items.has_key(choice):
>       os.system('s%')% menu_items[choice]
> else:
>       sys.exit('Sorry, try again.')
> 
> ---------end silly menu script-------------
> 
> For some reason, I get a problem with: 
> 
>       os.system('s%')% menu_items[choice]
> 
> which gives this number coercion error:
> 

it's "%s", not vice versa.