Python For Loop

Below code demonstrated using Python for loop.

#Python for loop
def main():
  x = 0
  #define for loop
  for x in range(5, 10):
    print(x)

if __name__ == "__main__":
  main()


----------------------------------------------
#Output
5
6
7
8
9

Comments

Popular posts from this blog

How to write to a file in Kotlin

Python Tkinter example