일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- pandas
- Lotto
- install
- Numpy
- pycharm
- SPL
- mean
- keras
- ipad
- GT-S80
- dataframe
- Button
- synology
- GitHub
- mariadb
- Series
- RNN
- SciPy
- 삼성소프트웨어멤버십
- pip
- CNN
- Splunk
- DFS
- Python
- imread
- LSTM
- 알고리즘
- javascript
- index
- E-P1
Archives
- Today
- Total
잠토의 잠망경
[Python] slide 본문
a = [1,2,3,4,5,6,7]
print(a[3:]) # [4,5,6,7]
print(a[-1:]) # [7]
print(a[-2:]) # [6,7]
print(a[-7:]) # [1,2,3,4,5,6,7]
print(a[:2]) #[1,2]
print(a[:6]) #[1,2,3,4,5]
print(a[2:2]) #[]
print(a[2:3]) #[3]
print(a[2:4]) #[3,4]
print(a[-4:0]) #[]
print(a[-4:-5]) #[]
print(a[-4:-4]) #[]
print(a[-4:-3]) #[4]
print(a[-4:-2]) #[4,5]
print(a[3:0:-1]) #[4,3,2]
print(a[3:0:1]) #[]
print(a[3:-1:-1]) #[]
print(a[3:0]) #[]
print(a[3::-1]) #[4,3,2,1]
print(a[::1]) #[1,2,3,4,5,6,7]
print(a[::2]) #[1,3,5,7]
print(a[::3]) #[1,4,7]
print(a[-5::1]) #[3,4,5,6,7]
print(a[-5::2]) #[3,5,7]
print(a[-5::3]) #[3,6]
print(a[::-1]) #[7,6,5,4,3,2,1]
print(a[::-2]) #[7,5,3,1]
print(a[3::-1]) #[4,3,2,1]
print(a[-100:100]) #[1,2,3,4,5,6,7]
print(a[100:]) #[]
print(a[:100]) #[1,2,3,4,5,6,7]
print(a[100:100]) #[]
Comments