In [1]:
var = "파이썬 객체 지향 이야기"

In [2]:
id(var)


Out[2]:
4363648096

In [3]:
type(var)


Out[3]:
str

In [4]:
str


Out[4]:
str

In [5]:
type(str)


Out[5]:
type

In [6]:
id(str)


Out[6]:
4296894976

In [7]:
id


Out[7]:
<function id>

In [8]:
type(id)


Out[8]:
builtin_function_or_method

In [9]:
id(id)


Out[9]:
4298650680

In [10]:
type


Out[10]:
type

In [11]:
id(type)


Out[11]:
4296883728

In [12]:
type(type)


Out[12]:
type

In [13]:
var.__class__


Out[13]:
str

In [14]:
str.__class__


Out[14]:
type

In [15]:
type.__class__


Out[15]:
type

In [16]:
id.__class__


Out[16]:
builtin_function_or_method

In [17]:
var


Out[17]:
'파이썬 객체 지향 이야기'

In [18]:
var.replace("파이썬","Python")


Out[18]:
'Python 객체 지향 이야기'

In [19]:
var


Out[19]:
'파이썬 객체 지향 이야기'

In [20]:
class BookReader:
    name = str()
    def read_book(self):
        print(self.name + " is reading Book!!")

In [21]:
reader = BookReader()

In [22]:
type(reader)


Out[22]:
__main__.BookReader

In [23]:
reader._name = "Chris"

In [24]:
reader.read_book()


 is reading Book!!

In [27]:
def sample():
    return None

In [28]:
sample("abc")


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-28-40316437eca0> in <module>()
----> 1 sample("abc")

TypeError: sample() takes 0 positional arguments but 1 was given

In [ ]: