Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python default input

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

# Older versions:
age = int(raw_input('Enter your age: ') or 18)
Comment

PREVIOUS NEXT
Code Example
Python :: switching versions of python 
Python :: cosine similarity python numpy 
Python :: union df pandas 
Python :: pygame hide cursor 
Python :: backwards loop over list in python 
Python :: python get current user windows 
Python :: python math cube root 
Python :: python if else variable assignment 
Python :: python pdf to excel 
Python :: python time function duration and memory usage 
Python :: embed_author discord.py 
Python :: system commands in python windwos 
Python :: fastest sort python 
Python :: how to use if else to prove a variable even or odd in python 
Python :: python color text console 
Python :: cvtcoloer opencv 
Python :: print all alphabets from a to z in python 
Python :: python if not path exist make path 
Python :: how to reomve certain row from dataframe pandas 
Python :: get_terminal_sizee python 
Python :: django all urls 
Python :: find null value for a particular column in dataframe 
Python :: python dataframe column string to integer python 
Python :: perfect number program in python 
Python :: hot reloading flask 
Python :: python path filename 
Python :: python read text file look for string 
Python :: install python3 6 ubuntu 20 
Python :: how to play mp3 audio in python 
Python :: python break when key pressed 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =