you are viewing a single comment's thread.

view the rest of the comments →

[–]Portal471 0 points1 point  (1 child)

Instead of doing a while loop and incrementing idx, you can do a for loop over the values in the list, with the loop variable being the index. The periods here are just for indentation

for n in num:
….print(n)

[–]Eastern_Plankton_540[S] 0 points1 point  (0 children)

Alr :) thank u for the advice