Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

make a script run itself again python

#our code
var = input("Hi! I like cheese! Do you like cheese?").lower()
if var == "yes":
  print("That's awesome!")

# using While True
while True: # Will keep going untill told not to using 'break'
  var = input("Hi! I like cheese! Do you like cheese?").lower()
  if var == "yes":
    print("That's awesome!")
Comment

PREVIOUS NEXT
Code Example
Python :: python Decompress gzip File 
Python :: python spotify player 
Python :: how to do a foreach loop in python 
Python :: python bitwise operators 
Python :: changing plot background color in python 
Python :: python remove key from dict 
Python :: read binary image python 
Python :: iterate through characters in a string python 
Python :: python for loop array index 
Python :: batchnorm1d pytorch 
Python :: timedelta 
Python :: discordpy get role by id 
Python :: find size of mongodb collection python 
Python :: python list prime numbers 
Python :: select a random element from a list python 
Python :: How to do train test split in keras Imagedatagenerator 
Python :: get name of a file in python 
Python :: check if two strings are anagrams python 
Python :: django include all columns admin show 
Python :: remove first character of string python 
Python :: most common value in a column pandas 
Python :: how to retrieve dictionary values in python by index 
Python :: python loop append to dictionary 
Python :: python list splicing 
Python :: python count code, Count number of occurrences of a given substring 
Python :: change strings in a list to uppercase 
Python :: python sort class by attribute 
Python :: python replace only first instance 
Python :: string to dictionary python 
Python :: change dictionary value python 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =