List | Sololearn: Learn to code for FREE!

0

List

Is there a function that work like next() but when it reach the end of the list it comes back to the beginning?

5/4/2021 11:46:52 AM

Mr.Fish

2 Answers

New Answer

+2

Is cycle() what you need? https://stackoverflow.com/questions/23416381/circular-list-iterator-in-python

0

CarrieForle Yes! Thank you so much 👍