int()
>>> user_intput = input("정수를 입력하세요: ")
>>> print("제곱: ", int(user_input)**2)
정수를입력하세요: 7
제곱: 49
>>> a = "12345"
>>> print(int(a))
12345
>>> b = 12.5
>>> print(int(b))
12
float()
>>> a = 10
>>> print(float(a))
10.0
max(), min()
- 시퀀스 자료형에 포함되어 있는 원소 중 최대값 혹은 최소값
>>> list = [5, 6, 3, 2, 9, 8, 4, 1, 7]
>>> print(max(list))
9
>>> print(min(list))
1
bin(), hex()
- bin() : 10진수를 2진수로 변환
- hex() : 10진수를 16진수로 변환
>>> print(bin(128))
0b100000000
>>> print(hex(230))
0xe6
>>> print(int('0xe6', 16))
230
round()
>>> print(round(123.789, 0))
124.0
>>> print(round(123.789, 2))
123.79
>>> print(round(123.789, 1))
123.8
>>> print(round(123.789, -1))
120
type()
>>> int1 = 1
>>> str1 = "문자열"
>>> list1 = [1, 2, 3]
>>> dict1= ['apple': '사과']
>>> print(type(int1))
<class 'int'>
>>> print(type(str1))
<class 'str'>
>>> print(type(list1))
<class 'list'>
>>> print(type(dict1))
<class 'dict'>