Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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]
 
PREVIOUS NEXT
Tagged: #python #move #item #list #list
ADD COMMENT
Topic
Name
5+1 =