728x90
반응형
Built in Functions
type을 변경하는 함수
int(), float(), bool(), str()
age = "18"
print(type(age))
# <class 'str'> 출력
n_age = int(age)
print(type(n_age))
# <class 'int'> 출력
🍋 Built in Functions 참고하기
https://docs.python.org/3/library/functions.html
Built-in Functions — Python 3.9.1 documentation
Built-in Functions The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order. abs(x) Return the absolute value of a number. The argument may be an integer, a floating poin
docs.python.org
반응형
'프로그래밍 > Python' 카테고리의 다른 글
조건문 if & 반복문 for (0) | 2020.12.22 |
---|---|
Function 정의 (0) | 2020.12.21 |
sequence type(열거형 타입) - list, tuple & Dictionary(딕셔너리) (0) | 2020.12.18 |
변수 (0) | 2020.12.18 |
Repl.it (0) | 2020.12.18 |