![]() |
Class objects - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Class objects (/thread-29274.html) Pages:
1
2
|
RE: Class objects - jefsummers - Aug-26-2020 You reference the object, it gives you the object. RE: Class objects - snippsat - Aug-26-2020 (Aug-26-2020, 07:16 PM)Python_User Wrote: how I can show the print (g1) as FIFA, 2008, €50Just change a little in my __str__ method.def __str__(self): return f'{self.title}, {self.year}, {self.price}' RE: Class objects - Python_User - Aug-27-2020 Ok, thanks ![]() |