Python List
Python List
Python List
list1 = list2.copy()
list1 = list2[starting:ending].copy()
list1 = list2[starting:ending]
L1 = [ ‘I’ , ‘N’ , ‘D’ , ‘I’ , ‘A’ , ‘N’] Output :
L2 = L1.copy() [ ‘I’ , ‘N’ , ‘D’ , ‘I’ , ‘A’ , ‘N’]
print(L2) [ ‘I’ , ‘N’ , ‘D’ , ‘I’ , ‘A’ ]
L3 = L1[0:5].copy() [ ‘I’ , ‘A’ , ‘N’]
print(L3)
L4 = L1[-3:-1]
print(L4)