Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

while loop user input python

# take userinput and will keep asking same question
# until gets the desired/set output

i = 'yes'
while True:
    n = str(input('Are we going on a date?: '))
    if n == i:
        print('We are going on a Date')
        break
Comment

PREVIOUS NEXT
Code Example
Python :: python export multiple dataframes to excel 
Python :: beautifulsoup find_all by id 
Python :: append method linked list python 
Python :: sum values in django models 
Python :: tuple with one element python 
Python :: flask send client to another web page 
Python :: python assers 
Python :: python sqlite dict 
Python :: django post request 403 forbidden 
Python :: shutil move overwrite 
Python :: create a role with discord.py 
Python :: python mysqldb 
Python :: delete specific indeces from numpy array 
Python :: How can I install XGBoost package in python on Windows 
Python :: print % in python 
Python :: python get path of current file 
Python :: numpy generate random 2d array 
Python :: how to create obtain any random 3 items of list in python 
Python :: how to use print function in python 
Python :: if list item is found in string get that item python 
Python :: django rest documentation 
Python :: double for in python 
Python :: django sort descending 
Python :: how to do date time formatting with strftime in python 
Python :: selenium get parent element python 
Python :: how to read unicode in python 
Python :: get int64 column pandas 
Python :: python pad with zeros 
Python :: python delete white spaces 
Python :: upload py file using flask 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =