May-29-2020, 08:10 PM
(May-28-2020, 09:27 PM)bowlofred Wrote: You have referred to the class inside the class definition. Modify your indents to do it outside.
class Student(object): def __init__(self, name="Rob", grade='A', county="Essex"): self.name = name self.grade = grade self.county = county student1 = Student() print(student1.name)
Output:Rob
Thank you very much, stupid error, so thank you for answering.