I want to give input yes/no automatically rather than through keyboard/user input.
user_choice = raw_input("Are you sure want to remove all item (y/n):\n")
if user_choice in('y','Y'):
statement...
else:
sys.exit(0)`
I want to give input yes/no automatically rather than through keyboard/user input.
user_choice = raw_input("Are you sure want to remove all item (y/n):\n")
if user_choice in('y','Y'):
statement...
else:
sys.exit(0)`