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

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -