fork download
  1. a=[1,3,4,5,6,7,8]
  2. print(a[1:3])
  3. for item in a :
  4. print(item);
  5. b=[item for item in a if item>0];
  6. print(b);
Success #stdin #stdout 0.01s 7196KB
stdin
45
stdout
[3, 4]
1
3
4
5
6
7
8
[1, 3, 4, 5, 6, 7, 8]