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

3번째 줄: 3번째 줄:


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

2020년 4월 6일 (월) 20:32 판

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 }}