a = [1,2,3,4,5]
#1
for i in range(n-1,-1,-1):
print(a[i])
#2
print(a[::-1])
print(a[4::-1])
#3
a.reverse()
print(a)
'python, pyTorch' 카테고리의 다른 글
GNN dataset (dynamic graph) (0) | 2021.08.11 |
---|---|
tensorflow-gpu 에러 (해결) (0) | 2021.08.07 |
torch-geometric install error(2) (0) | 2021.08.06 |
torch-geometric install error(1) CUDA 재설치 (0) | 2021.08.06 |
GPU_pytorch 사용하기 (0) | 2021.08.06 |