Instance in python

technical talkiess
0

 class student:

    def __init__(self,firstName,lastName):

        self.firstName = firstName

        self.lastName = lastName

        

    

    def Full_name(self):

        return f"{self.firstName} {self.lastName}"

        

p1 = student('vishal','usrate')

print(p1.firstName)

Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)