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

  • Home
  • SEARCH
  • 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 8806717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:11:39+00:00 2026-06-14T02:11:39+00:00

Just studying data structures in python for a project and can’t work out the

  • 0

Just studying data structures in python for a project and can’t work out the difference in a dictionary and a data structures in this form:

class Address:

    def __init__(self, house_number, house_street, house_city,
                 house_county, house_postcode):
        self.number = house_number
        self.street = house_street
        self.city = house_city
        self.county = house_county
        self.postcode = house_postcode

    def __repr__(self):
        return ('<Class: \'Address\', '+ str(self.number) + ' ' +
                self.street + ' ' + self.city + ' ' +
                self.county + ' ' + self.postcode + '>')


## Creates an object Address and assign it to a variable
my_address = Address(1, 'abc', 'def', 'ghi', 'jkl')

## Print the object My_address
print 'Address object:', my_address

print 'house number:', my_address.number

## change house number
my_address.number = 555

print 'NEW house number:', my_address.number

The code sample is modified from sample code given in a lecture at university of york.

  • 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-14T02:11:41+00:00Added an answer on June 14, 2026 at 2:11 am

    A python dict is a highly optimized hash table, which is a data structure.

    So, to put it differently, a python dict is one example of a data structure. So are the set, list, string and unicode types. A custom class is again another data structure, one that is highly customizable to your application needs.

    From the WikiPedia entry on Data structure:

    In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

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

Sidebar

Related Questions

I just saw this code while studying the wordpress source code (PHP), You can
After studying TCP/UDP difference all week, I just can't decide which to use. I
I am studying REST with JAX-RS, and this doubt just came to my mind:
I was just studying OCPJP questions and I found this strange code: public static
I just saw this data-structure on the Java 6 API and I'm curious about
I have this question when I am studying an open source Android project. I
I have just started studying Binary Tree. Is there an algorithm to find out
I'm studying some source codes and I'm just wondering why a class (or classes)
In learning C, I've just begun studying pointers to structures and have some questions.
I just started studying C++, and I met this new guy: ->. I was

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.