get list from list python

Solutions on MaxInterview for get list from list python by the best coders in the world

showing results for - "get list from list python"
Leonardo
13 Aug 2016
1list1 = [1, 2, 3, 4, 5]
2
3list2 = list1[0:3]
4print(list2)
5
6//output
7[1,2,3]