[Tutor] input problem
ANKUR AGGARWAL
coolankur2006 at gmail.com
Mon Sep 13 22:45:41 CEST 2010
Suppose i am taking input or various variables like
a=raw_input("...............") //hello
b=raw_input("................")//hi
c=raw_input("...............")//hello
d=raw_input("..........")//hello
but i want to run a common function when input is hello
so instead of
if a=="hello":
fun()
then again for b and then again for c then d and so on i have to apply the
code for the specific variable ,
i want to run the function whenever in the code input is "hello"
i am wondering is there is any way like
if input=="hello":
fun()
i hope you get my point.. Help me out please
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100914/f952cf4b/attachment.html>
More information about the Tutor
mailing list