Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8838097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:54:08+00:00 2026-06-14T09:54:08+00:00

I have an input stream as follows: data = [[1,234],[2,432],[3,443]] How can I get

  • 0

I have an input stream as follows:

data = [[1,234],[2,432],[3,443]]

How can I get the second element of every list? I can get the second value of a single entry by data[0][1], or every list in a range with both elements using data[0:2], but how to get just the second element from every list? Is there a better solution than just looping through the list?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:54:09+00:00Added an answer on June 14, 2026 at 9:54 am

    Use a list comprehension:

    [lst[1] for lst in data]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So a FILE stream can have both input and output buffers. You can adjust
I have an input stream, and I want to map to output lines. For
I have been testing the performance of reading server socket input stream. I found
I have an input stream containing integers and special meaning characters '#'. It looks
I have an application that reads string data in from a stream. The string
I'm developing Server-Client application and I have a problem with waiting for input data
I have a linux application that gets an input stream from some device. That
I have this line in my program : InputStream Resource_InputStream=this.getClass().getClassLoader().getResourceAsStream(Resource_Name); But how can I
I have input text: <div><label wicket:for=name>Name</label><input type=text wicket:id=name /></div> Now I need to add
I have input.txt and I want to search for a string and extract a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.