a = input() if a: #do somthing else: #do something else
input()
try: a = input() NameErro: #do somthing else: #do something else
try: a = input() #value exists print("You entered something!") except: #value does not exist print("You didn't enter anything!")
a = raw_input() if a=="": print "you have not entered anything!" else: print "you have enter {}.".format(a)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)