+ 1

what does this code do?

list1.insert(1, num1 + num2) ? If num1 = 2,4,7,1,3,5 num2= 2,4,7,1,3 Wouldn’t it add num1 and num2 ? Please help Thank you ^-^

23rd Jun 2019, 2:45 AM
banna101
2 ответов
+ 2
Thank youuuuuu again
23rd Jun 2019, 4:03 AM
banna101
+ 1
list1 = [40, 41, 42] num1 = 2, 4, 7, 1, 3, 5 num2 = 2, 4, 7, 1, 3 list1.insert(1, num1 + num2) print(list1) # [40, (2, 4, 7, 1, 3, 5, 2, 4, 7, 1, 3), 41, 42]
23rd Jun 2019, 3:50 AM
Diego
Diego - avatar