python 2.7 - How to decide whether if run a function by user in script -


i got 2 function in script :

def a(): print a

def b(): print b

how decide whether if run function 'b' user? advance

#at starting of script take username input  name = raw_input("enter name : ") name.lower() #to make input name lowercase  if name == 'bob': #name have call b    b() else:    a() 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -