Answers for "get next element while looping"

0

get next element while looping

arr = [1,2,3,4]
arr = iter(arr)

for x in arr:
  print(x, next(arr))
Posted by: Guest on June-02-2021

Code answers related to "get next element while looping"

Python Answers by Framework

Browse Popular Code Answers by Language