Fragkiller
Fragkiller

Reputation: 609

Picking the First string from a List

how i can Pick only the First pick in a List in this example?

List = [[110, 10, 20 , 30], [120, 40, 50, 60], [130, 70, 80, 90]]

The Output should be:

Times = [110, 120, 130]

Thank you

Upvotes: 2

Views: 237

Answers (2)

volcano
volcano

Reputation: 3582

Come on

[l[0] for l in my_list]

Upvotes: 3

Fragkiller
Fragkiller

Reputation: 609

Try this new_list = old_list[0].

Wouldnt this just Show the Output

[110, 10, 20, 30]

Upvotes: 0

Related Questions