combining two lists

Sai_kiran_rachakonda · October 30, 2022
list1 = [23, 24, 25, 26] 
list2 = [27, 28, 29, 30]
list1.extend(list2)
print(list1)

     #or

list1 = [23, 24, 25, 26] 
list2 = [27, 28, 29, 30]
list3 = list1 + list2
print(list3)
Output

Comments

Please sign up or log in to contribute to the discussion.