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 4125010
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:48:51+00:00 2026-05-20T23:48:51+00:00

I created a list on twitter and added a user to it. Then I

  • 0

I created a list on twitter and added a user to it. Then I finally figured out how to write the code without an error. I am a newbie. Then Lo and behold when i get data it is whacked out. I have no idea what to do with it.

All I want is to get the usernames of everyone in the the list.

Here is the code:

the_list = api.list_members('username', 'listname')
for user in the_list:
    print user

Here is what I get:

tweepy.models.User object at 0x90b78ec
(0, 0)

That doesn’t look like list_members to me.
I want to create a normal python list of just the usernames.

Thanks for any help.

  • 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-05-20T23:48:51+00:00Added an answer on May 20, 2026 at 11:48 pm

    Each element of the list is a User object, which holds more information about the user than just their name. If you want just the names, do

    the_list = [u.screen_name for u in the_list]
    

    after calling api.list_members. Or you can combine the two:

    the_list = [u.screen_name for u in api_list_members('username','listname')
    

    or you can extract the names only when you’re displaying them:

    the_list = api.list_members('username','listname')
    for user in the_list:
        print user.screen_name
    

    Incidentally, you should choose a more informative name than the_list. Perhaps user_names or list_members or something.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a Facebook/Twitter style status update where the new Status' get added to
I'm attempting to write a Twitter Powershell script that will use community created interfaces
I created a brand new Rails 3.1 app. I added the twitter bootstrap CSS
I am trying to use dynamically created list in WHERE, for example: select *
I created a list of lists: >>> xs = [[1] * 4] * 3
I created the list that have device detected, and I want to send data
I've created a list using the SharePoint (MOSS 2007) Issue Tracking List. A Comments
I have created a list view that displays the names and dates of items
I've created a list of events in a select it generates the option markup
I have created a list form that gets attached to a main form in

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.