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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:06:28+00:00 2026-06-05T12:06:28+00:00

I am a noob to Python. I constantly find myself looking at a piece

  • 0

I am a noob to Python.

I constantly find myself looking at a piece of code and trying to work out what is inside a data structure such as for example a dictionary. In fact the first thing I am trying to work out is “what sort of data structure is this?” and THEN I try to work out how to see what is inside it. I look at a variable and say “is this a dict, or a list, or a multidict or something else I’m not yet familiar with?”. Then, “What’s inside it?”. It’s consuming vast amounts of time and I just don’t know if I’m taking the right approach.

So, the question is, “How do the Python masters find out what sort of data structure something is, and what techniques do they use to see what is inside those data structures?”

I hope the question is not too general but I’m spending ridiculous amounts of time just trying to fix issues with recognizing data structures and viewing their contents, let alone getting useful code written.

thanks heaps.

  • 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-05T12:06:29+00:00Added an answer on June 5, 2026 at 12:06 pm

    Using type() function for the variable will tell you the data type. For example:

    inventory = {'cows': 4, 'pigs': 3, 'chickens': 5, 'bears': 2}
    print(type(inventory))
    

    will print

    <class 'dict'>

    which means the variable inventory is a dictionary.

    Other possible data types are ‘str’ for string, ‘int’ for integer, ‘float’ for float,’tuple’ for tuple, and ‘bool’ for boolean values.

    To see what’s inside a collection, you can simply use print() function.

    aList = [ 'hunger', 'anger', 'burger']
    print(aList)
    

    will output

    ['hunger', 'anger', 'burger']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a Python noob, so bear with me. I'm trying to work with the
I've just started programming, therefore I'm kinda noob. I'm trying to use python to
Noob dumb question, no doubt -- but here it is: Trying to tutorialize myself
Python noob trying to learn Pylons. I'm using the QuickWiki tutorial ( http://pylonshq.com/docs/en/1.0/tutorials/quickwiki_tutorial/ )
I'm somewhat of a noob to python but I'm trying to create a recursive
I keep getting an error whenever I enter this code (I'm a python noob
Does iPython work on Mac OS X 10.6.1 Snow Leopard? I'm python noob, how
A relative noob to Python, I've successfully pulled a text file, out of a
I trying to make minimal part of Python to work as part (static library)
I'm trying to install python plugin for Trac. Being a noob, I don't quite

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.