class file:
def __init__(self, mp3, mp4, txt):
self.mp3 = mp3
self.mp4 = mp4
self.txt = txt
I don't know why I have to do this. What happens if self.txt = txt
doesn't process this?
I don't understand the use of self yet, so I have a hard time moving forward.
In the method, self means the object. If self is omitted from the member variable declaration/assignment, the variable is It is created in the scope of the called method, not in the namespace of the instance being created.
© 2024 OneMinuteCode. All rights reserved.