티스토리 뷰
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
>>> a = set((1,2,3))
>>> a
{1, 2, 3}
>>> type(a)
<class 'set'>
>>> b = list(a)
>>> b
[1, 2, 3]
>>> type(b)
<class 'list'>
>>> c = tuple(b)
>>> c
(1, 2, 3)
>>> type(c)
<class 'tuple'>
>>> d = set(c)
>>> d
{1, 2, 3}
>>> type(d)
<class 'set'>
-. in 연산자, 데이터형 내부에 존재하는 값 확인
>>> a = set((1,2,3))
>>> 1 in a
True
>>> b = list(a)
>>> 2 in b
True
>>> c = tuple(b)
>>> 3 in c
True
>>> 4 in a
False
'Python' 카테고리의 다른 글
Python, 부울 (0) | 2016.04.21 |
---|---|
Python, 사전(Dictionary) (0) | 2016.04.21 |
Python, 튜플 (0) | 2016.04.19 |
Python, 세트 (0) | 2016.04.19 |
Python, 리스트 (0) | 2016.04.19 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Module
- 폼
- activeforeground
- 리눅스
- highlightbackground
- activebackground
- 파이썬
- Excel
- 상수
- Python
- onetomany
- Linux
- highlightthickness
- tkinter command & bind [명령어묶기와 사건묶기] Python
- tkinter
- Java
- borderwidth
- indicatoron
- Private
- Composite Key
- command
- vba
- apache
- JPA
- IdClass
- ManyToOne
- disabledforeground
- checkbutton
- FetchType
- fetch join
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함