Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zoo class
#2
dictionaries work very well for this type of application
example:
animals = {
    'Skunk': {
        'species': 'mammal',
        'toothed': True,
        'hair': True,
        'breathes': True,
        'legs': 4
    },
    'human': {
        'species': 'mammal',
        'toothed': True,
        'hair': True,
        'breathes': True,
        'legs': 2
    }
}
Reply


Messages In This Thread
Zoo class - by saaat - Dec-02-2019, 03:23 AM
RE: ZOO CLASS - by Larz60+ - Dec-02-2019, 04:38 AM
RE: ZOO CLASS - by buran - Dec-02-2019, 06:45 AM
RE: Zoo class - by jefsummers - Dec-02-2019, 02:50 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020