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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

java - Log4j2 configuration not found when running standalone application builded by shade plugin -

python - How do I create a list index that loops through integers in another list -