Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
Tags
- 맛집
- PyQt
- ubuntu
- 리눅스
- tensorflow
- python
- flutter
- ASP
- urllib
- swift
- MS-SQL
- 다이어트
- IOS
- 라즈베리파이
- node.js
- 날짜
- PER
- port
- pandas
- sqlite
- mssql
- GIT
- 함수
- 유니티
- Excel
- MySQL
- Linux
- PyQt5
- javascript
- Unity
Archives
아미(아름다운미소)
Python type() Check Python data type 본문
Check Python data type
Python에서는 데이터타입을 확인 하기 위해서는 type() 을 사용하여 확인 합니다.
print(type(123))
print(type(12.3))
print(type('123'))# <class 'int'> # <class 'float'> # <class 'str'>
print(type([]))
print(type([1, 2, 3, 4, 5]))
print(type({}))
print(type(()))# <class 'list'> # <class 'list'> # <class 'dict'> # <class 'tuple'>
print(type(None))
# <class 'NoneType'>print(type('한글'))
print(type(u'한글'))
# <class 'str'> # <class 'str'>
'랭귀지 > python' 카테고리의 다른 글
| Python Named colors in matplotlib (0) | 2018.10.03 |
|---|---|
| Python 슬라이싱으로 문자열 나누기 (0) | 2018.10.02 |
| Python split() join() (0) | 2018.09.29 |
| python for에서 인덱스와 요소의 값을 동시에 출력하기 (0) | 2018.09.28 |
| python while (0) | 2018.09.27 |
Comments