파이썬 리스트의 원소 순서 뒤집기 - reverse()
파이썬의 리스트(list) 원소의 순서를 역순으로 뒤집을 수 있습니다. 리스트의 reverse() 함수를 이용합니다. 예시를 보면 금방 알 수 있습니다.
x = ['a', 'b', 'c']
print(x)
['a', 'b', 'c']
순서를 바꾸려면 아래와 같이 합니다.
x.reverse()
print(x)
['c', 'b', 'a']
순차적으로 원소를 리스트에 저장한 후에 역순으로 뭔가 처리를 해야 할 때 간단하게 순서를 뒤집을 수 있습니다.
@joviansummer의 스팀 프로젝트
스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)
jsup 서비스에 큐레이션 보상 분배 기능이 추가되었습니다.
jSTEEM 프로젝트 - 텔레그램 챗봇으로 구현하는 스팀 블럭체인 탐색기
Posted through the AVLE Dapp (https://avle.io)
Thank you, friend!


I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.