๋ชฉ๋กPython (1)
๐๐๐ ๐๐๐๐บ๐๐๐๐๐
[Python] What is "self" in Python?
In Python, "self" refers to the specific instance that is calling the method. So, "self" is used to assign or update attributes for the specific instance.# Defining a Class using "self"class greatatcoding: def __init__(self, name, age): self.name = name # "self.name" is an instance attribute; "name" is a local parameter self.age = age def hello(self): print(f"..
Python
2025. 1. 7. 03:42