Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 334 Bytes

File metadata and controls

15 lines (12 loc) · 334 Bytes

What Did I Learn?

In this challenge, I learned two different ways to traverse a list in Python:

  1. Using
for i, value in enumerate(nums):

This allows us to get both the index and the value of the list.

  1. Using
range(i + 1, len(nums))

In the other type of loop, we only get the index of the list.