Q:

Write a Python program to replace the last element in a list with another list

0

Write a Python program to replace the last element in a list with another list

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

num1 = [1, 3, 5, 7, 9, 10]
num2 = [2, 4, 6, 8]
num1[-1:] = num2
print(num1)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now