일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 성공
- Kotlin else if
- Python Class
- NextJs
- 파이썬 클래스
- 파이썬 제어문
- 파이썬 반복문
- 희망
- Kotlin 클래스
- Kotlin Class
- Kotlin 조건문
- 파이썬
- git
- github
- activate 오류
- 클래스 속성
- Python
- 파이썬 장고
- 자바 기본타입
- python Django
- 도전
- 강제 타입변환
- 장고 가상환경
- Kotlin If
- 넥스트js
- Kotlin 클래스 속성정의
- django virtualenv
- Variable declaration
- 다중조건문
- 좋은글
Archives
- Today
- Total
목록Python Casting (1)
키모스토리

type() 해당 데이터타입을 모르거나 확인이 필요한 경우 사용 # data type을 확인 type(123) type(12.3) type('123') type([]) type({}) type(()) # type 확인 결과 int() 해당 데이터를 int type으로 변환. 문자형의 경우 변환할 수 없음. int(1.23) int('123') int('a') # 실행결과 1 123 value error float() 해당 데이터를 float type으로 변환. 문자형의 경우 변환할 수 없음. float(12) float('12') float('-123') float('1e-003') float('a') # 실행결과 12.0 12.0 -123.0 0.001 error str() 해당 데이터를 str typ..
Python/Python
2022. 12. 14. 18:24