"Python array unique()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(다른 사용자 한 명의 중간 판 4개는 보이지 않습니다)
2번째 줄: 2번째 줄:
;Python array_unique()
;Python array_unique()


<source lang='python' run>
{{소스헤더|리스트}}
<syntaxhighlight lang='python' run>
a = [ 1,4,5,4,4,3,2,1 ]
a = [ 1,4,5,4,4,3,2,1 ]
b = list(set(a))
b = list(set(a))
print( b )
print( b )
</source>
</syntaxhighlight>


<source lang='python' run>
{{소스헤더|딕셔너리}}
<syntaxhighlight lang='python' run>
a = {'a':'hello', 'b':'world', 'c':'hello'}
a = {'a':'hello', 'b':'world', 'c':'hello'}
b = list(set(a.values()))
b = list(set(a.values()))
print( b )
print( b )
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:31 기준 최신판

1 개요[ | ]

Python array_unique()
리스트
a = [ 1,4,5,4,4,3,2,1 ]
b = list(set(a))
print( b )
딕셔너리
a = {'a':'hello', 'b':'world', 'c':'hello'}
b = list(set(a.values()))
print( b )

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}