In this tutorial, we will learn about looping techniques in python 3.x. Or earlier. There are many ways in which we can implement loops. Here we will be discussing four techniques in looping.
# enumerate() type for index, value in enumerate(['Tutorial','point']): print(index, value)
0 Tutorial 1 point
# zip() method arr1 = ['Tutorial','point'] arr2 = ['python','loops'] for i,j in zip(arr1, arr2): print(i,j)
Tutorial python point loops
# membership operator for i in ['Tutorial','point']: print(i)
# infinite loop while(True): pass
# range with step incrementer For i in range(0,4,2): print(i)
In this article, we learned about Looping Techniques in Python 3.x. Or earlier.