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

(새 문서: ==개요== ;Python array_unique() <source lang='python' run> a = [ 1,4,5,4,4,3,2,1 ] b = list(set(a)) print( b ) </source> ==같이 보기== * 함수 array_unique() 분류: P...)
 
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(다른 사용자 한 명의 중간 판 6개는 보이지 않습니다)
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>
 
{{소스헤더|딕셔너리}}
<syntaxhighlight lang='python' run>
a = {'a':'hello', 'b':'world', 'c':'hello'}
b = list(set(a.values()))
print( b )
</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 }}