Quantcast
Channel: Python: Accessing object attributes from objects stored in a dictionary - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Loïc Faure-Lacroix for Python: Accessing object attributes from...

Change thisdef make(name='', street='', city='', state='', zip='', count=0): dic[count]=User(name='', street='', city='', state='', zip='')todef make(name='', street='', city='', state='', zip='',...

View Article



Python: Accessing object attributes from objects stored in a dictionary

I have a dictionary with objects being stored as values. How might I access and print the attributes of a particular object? For example,dict={0:obj0, 1:obj1, 2:obj2, 3:obj3}I want to print...

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images