list1=['a','c','e']
list2=['b','d','f']
list3=list1+list2
list3.sort()
print(list3)
------------------------------
['a', 'b', 'c', 'd', 'e', 'f']
If you add lists 1 and 2, the two lists are combined. Sort the merged list using the sort function sort is sorted in order.
© 2024 OneMinuteCode. All rights reserved.