어떤 정렬 메서드도 내림차순 정렬을 위한 옵션이 없음을 알 수 있다. 배열의 슬라이스는 복사
본을 만들거나 어떠한 연산도 수행하지 않고 그저 뷰를 생성하기 때문에 이는 사실 큰 문제가
아니다. 많은 파이썬 사용자는
values
[::-
1
]
을 이용해서 순서가 뒤집어진 리스트를 얻어오는
트릭에 익숙하다.
ndarray ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.