POB_2019/zad1_1.py
2019-03-30 22:30:16 +01:00

16 lines
378 B
Python

class Przedmiot():
def __init__(self, subject):
self.name=subject
def __str__(self):
return self.name
subjects=[]
subjects.append(Przedmiot("Maths"))
subjects.append(Przedmiot("Physics"))
subjects.append(Przedmiot("PE"))
subjects.append(Przedmiot("Chemistry"))
subjects.append(Przedmiot("Computer Science"))
for subject in subjects:
print(subject)