Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get all values from class in python

>>> an = Animal()
>>> attrs = vars(an)
#{'kids': 0, 'name': 'Dog', 'color': 'Spotted', 'age': 10, 'legs': 2, 'smell': 'Alot'}

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #values #class #python
ADD COMMENT
Topic
Name
4+9 =