I wanna know if some list contains whole list. for example,
[1, 2, 3, 4, 5]
from this list, it contains
[1, 2, 3]
like this. can i do this without any module?
I wanna know if some list contains whole list. for example,
[1, 2, 3, 4, 5]
from this list, it contains
[1, 2, 3]
like this. can i do this without any module?
 
    
    list1 = [1,2,3]
list2 = [1, 2, 3, 4, 5]
result =  all(elem in list2  for elem in list1)
print(result)# True
