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 :: How to remove all characters after a specific character in python? 
Python :: list comprehension 
Python :: with open as file python 
Python :: Compute the 2d histogram of x and y. 
Python :: seaborn iris dataset 
Python :: pip install covid 
Python :: Python NumPy swapaxis Function Example 
Python :: dataframe to dictionary using index as key 
Python :: python f string 2 decimals 
Python :: python program to print ASCII characters in lowercase 
Python :: python argparse lists flags as optional even with required 
Python :: plt text matplotlib white background 
Python :: Matplotlib rotated xticklabels 
Python :: python string format 
Python :: python ordereddict 
Python :: remove zeros from decimal python 
Python :: python trim whitespace from end of string 
Python :: python cholesky 
Python :: import ImageGrab 
Python :: np.select with multiple conditions 
Python :: import ndimage 
Python :: python remove blanks from string 
Python :: find max in a dataframe 
Python :: domain name of my site 
Python :: python text color 
Python :: fetch data from excel in python 
Python :: pandas head sort by colun name 
Python :: maximum and minimum value of array python 
Python :: pyttsx3 save audio 
Python :: Pandas: How to Drop Rows that Contain a Specific String in 2 columns 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =