python 2.7 - Creating a Class with variable properties -
hi interested in creating class this
- class tutor
- tutor first name
- tutor last name
- tutor age
- tutor primary subjects
- tutor secondary subjects
my main issues subjects, tutor may have 1 10 primary subjects , 1 10 secondary subjects, not tutors have have same number of primary , secondary subjects class trying create needs flexible enough accommodate number of primary & secondary subject combinations. how best create data structure can use this
use list, or tuple if want several data types in list.
class tutor: firstname = "" lastname = "" age = 0 primarysubjects = [] secondarysubjects = []
Comments
Post a Comment