EXTREME NOOB, lists?
Will Ware
wware at world.std.com
Sat Sep 2 00:34:55 EDT 2000
skeetor (skeetornospam at bellsouth.net) wrote:
> I want to combine all the elif statements with the if statement to say.
> "if a is equal to any number in list x then print a's range"
Try this:
if a in [4, 6, 8, 10, 20, 50, 100]: # or whatever the exact list is...
dice_numbers(a)
else:
print "try again"
--
# - - - - - - - - - - - - - - - - - - - - - - - -
# Resistance is futile. Capacitance is efficacious.
# Will Ware email: wware @ world.std.com
More information about the Python-list
mailing list