Answers for "loop from end to start python"

3

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#
Posted by: Guest on August-09-2020
0

start loop at 1 python

l = [0,1,2,3,4]
for i in l[1:]:
    print(i)
# 1,2,3,4
Posted by: Guest on November-14-2021

Code answers related to "loop from end to start python"

Python Answers by Framework

Browse Popular Code Answers by Language