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' -

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

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -