Skip to content

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].

Notifications You must be signed in to change notification settings

candytale55/odd_indices_Py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

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].

Technologies

  • Python 3

Setup

NA - It's only coding examples, there's no setup.

Status

Project is: finished

References

The purpose of the project is just learning and practicing (I'm a newbie). From Codecademy's Learn Python 3 course Code Challenges exercises

About

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].

Topics

Resources

Stars

Watchers

Forks