Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python default input

# Python 3:
age = input('Enter your age: ') or 18

# Older versions:
age = int(raw_input('Enter your age: ') or 18)
 
PREVIOUS NEXT
Tagged: #python #default #input
ADD COMMENT
Topic
Name
9+3 =