Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python loop go back to start

while True:
  #do something
  continue #jumps back to while True
  # not do that
  
Comment

python loop back to start

def main(): #defines the area in indents that will be triggered with main()#
  print('hi')
  yn = input('Wanna loop back to the start? ')
  if yn = 'yes':
    main() #loops back to where we defined main#
    
main() #This starts the main loop, without this, main would just be defined but not run#
Comment

PREVIOUS NEXT
Code Example
Python :: intersection() Function of sets in python 
Python :: textclip python arabic 
Python :: python substring in string 
Python :: python plot groupby 
Python :: python num2words installation 
Python :: if list item in string python 
Python :: run code in python atom 
Python :: slicing of tuple in python 
Python :: how to make a button in python turtle 
Python :: how to know the python pip module version 
Python :: python input integer only 
Python :: how to get the value out of a dictionary python3 
Python :: how to code python 
Python :: pandas copy data from a column to another 
Python :: how to make a list a string 
Python :: get a list as input from user 
Python :: progress bar python 
Python :: python sort multiple lists based on sorting of single list 
Python :: max in a list python 
Python :: django prefetch_related vs select_related 
Python :: how to check if an element is in a list python 
Python :: charts in python 
Python :: blender scripting set active ojbect 
Python :: print font size python 
Python :: dataframe in python 
Python :: square root in python 
Python :: count_values in python 
Python :: How to select parts of a numpy array 
Python :: primary key auto increment python django 
Python :: jupyter notebook show full dataframe cell 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =