human
I am working on the file "Section 1 - Core Python/Chapter 09 - Classes & OOPS/01_Classes_and_OOPS.ipynb".
The first task is:
NOTE: both Second and sec are same object as their id's are same
Can you write Python program for it?
assistant
#Here is the Python program you requested.

class Second:
    def __init__(self, name = ""):
        self.fullname = name
        
    def set_name(self, name):
        print(id(self))
        self.fullname = name
        
    def get_name(self):
        return self.fullname

sec = Second("Vishal Saxena")
print(sec.get_name())

# first.py

class Second:
    def __init__(self, name, age=35):
        self.name(name)
        self.age = age
        
    def name(self, new_name):
        self.fullname = new_name
        
    def get_name(self):
        return self.fullname

sec = Second("Arya")
print(sec.get_name())
print(sec.age)

class Second:
    def __init__(self, name, age=55):
        self.name(name)
        self.age = age
        
    def name(self, name):
        self.name = name
        
    def get_name(self):
        return self.name

sec = Second("Rajneekanth")
print(sec.get_name())
print(sec.age)
print(dir(sec))
dir(sec.__dir__)

# first.py

class Second:
    fullname = "Mayank Johri"
    age = 33
        
    def name(self, name):
        self.fullname = name
        
    def get_name(self):
        return self.fullname

sec = Second()
print(dir(sec))
print(sec.get_name())
print(id(sec.fullname))
sec2 = Second()
print(id(sec2.fullname))

# first.py

class Second:
    fullname = "Ram Setu"
    age = 33
        
    def name(self, name):
        self.fullname = name
        
    def get_name(self):
        return self.fullname

rs_1 = Second()
rs_2 = Second()

print(rs_1.fullname == rs_2.fullname)
print(id(rs_1.fullname) == id(rs_2.fullname))

rs_1.name("ram setu")

print(rs_1.fullname == rs_2.fullname)
print(id(rs_1.fullname) == id(rs_2.fullname))

print(rs_1.fullname, " - ", rs_2.fullname)