Python While Loop
Below code demonstrates using a Python while loop.
------------------------------------------------
#Output
0
1
2
3
4
#Python while loop def main(): x = 0 #define while loop while(x < 5): print(x) x = x + 1 if __name__ == "__main__": main()
------------------------------------------------
#Output
0
1
2
3
4
Comments
Post a Comment