Answers for "python move item in list to another list"

0

python move item in list to another list

list_1 = [1, 2, 3]
list_2 = [6, 5, 4]
list_2.append(list_1.pop(-1))
print(list_1)  # [1, 2]
print(list_2)  # [6, 5, 4, 3]
Posted by: Guest on March-26-2022

Code answers related to "python move item in list to another list"

Python Answers by Framework

Browse Popular Code Answers by Language