Python Class and Methods Lecture
Python Class and Methods Lecture
• def introduce(self):
• print(f"My name is {self.name} and my
roll number is {self.roll}")
Creating Objects
• student1 = Student("Ali", 101)
• student2 = Student("Sara", 102)
• student1.introduce()
• student2.introduce()