0
  1. class student:
  2.     def __init__(self, name):
  3.         self.name = name
  4.     def __init__(self, name, email):
  5.         self.name = name
  6.         self.email = email
  7. # This line will generate an error  
  8. #st = student(“rahul”)  
  9. # This line will call the second constructor  
  10. st = student(“rahul”[email protected])
  11. print(“Name: “, st.name)
  12. print(“Email id: “, st.email)
Joymercy Asked question June 9, 2023