2

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

3
  • 1
    Curly braces are used for dictionaries - not lists! Commented Feb 18, 2015 at 2:04
  • Assuming it's a list, how about List[0] ? Commented Feb 18, 2015 at 2:04
  • Your question is improperly formulated. You need to take first elements of embedded lists from list of lists Commented Feb 18, 2015 at 2:28

2 Answers 2

3

Come on

[l[0] for l in my_list]
Sign up to request clarification or add additional context in comments.

Comments

0

Try this new_list = old_list[0].

Wouldnt this just Show the Output

[110, 10, 20, 30]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.