# tuple(x)
#    - input : list, str, range
#    - output : tuple
>>> tuple([1,2,3])
(1,2,3)
>>> tuple("123")
(1,2,3)
>>> tuple(range(1,4))
(1,2,3)

# list(x)
#    - input : tuple, str, range
#    - output : list
>>> list((1,2,3))
[1,2,3]
>>> list("123")
[1,2,3]
>>> list(range(1,4))
[1,2,3]

'Python > 기초이론' 카테고리의 다른 글

Python - 모듈  (0) 2023.02.11
Python - 함수  (0) 2023.02.11
Python - range  (0) 2022.12.25
Python - 튜플  (0) 2022.12.25
Python - for, while  (0) 2022.12.24

+ Recent posts