a=[1,3,4,5,6,7,8]print(a[1:3])for item in a : print(item);b=[item for item in a if item>0];print(b);
45
[3, 4] 1 3 4 5 6 7 8 [1, 3, 4, 5, 6, 7, 8]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!