Aug-27-2018, 02:57 PM
(Aug-27-2018, 02:45 PM)buran Wrote: fullname is method of class Person, so you need to call it like this
person1.fullname()you may want to print when call it
print(person1.fullname())a bit advanced, would be to make it a property (not method). If it is too advanced, just ignore this for the moment
@property def fullname(self): return '{} {} {}'.format(self.first, self.last, self.fathers_name)if you do so, you will access it like this
person1.fullname
Thanks you helped me a lot ! I appericate it !