I am trying to understand Classes in python.
Question: Why I am getting None in the output?
Here is my code :
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
def show_student(self):
print("Student Name:", self.name)
print("Student Age: ", self.age)
first_student = Student("amit", 12)
print(first_student.show_student())
And here is the output.
C:\Python38\python.exe D:/LearningRoot/DirFirst/test.py
Student Name: amit
Student Age: 12
None