https://github.com/candytale55/odd_indices_py
Function odd_indices() takes one parameter named lst. The function should create a new empty list and add every element from lst that has an odd index. The function should then return this new list. For example, odd_indices([4, 3, 7, 10, 11, -2]) should return the list [3, 10, -2].
https://github.com/candytale55/odd_indices_py
codecademy list-manipulation lists-python odd-numbers range
Last synced: 3 months ago
JSON representation
Function odd_indices() takes one parameter named lst. The function should create a new empty list and add every element from lst that has an odd index. The function should then return this new list. For example, odd_indices([4, 3, 7, 10, 11, -2]) should return the list [3, 10, -2].
- Host: GitHub
- URL: https://github.com/candytale55/odd_indices_py
- Owner: candytale55
- Created: 2021-01-24T10:25:46.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-24T10:29:33.000Z (about 5 years ago)
- Last Synced: 2023-05-29T01:21:01.956Z (almost 3 years ago)
- Topics: codecademy, list-manipulation, lists-python, odd-numbers, range
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0