+ 7
Błack Jesus❕ because at first when list 1 is extended then it's value will be List1 = [1, 2, 3] List2 = [2, 3, 4, 5] # Add List2 to List1 List1.extend(List2) print(List1) #[1, 2, 3, 2, 3, 4, 5] print(List2) #and list 2 at that time [2,3,4,5] #Add List1 to List2 now List2.extend(List1) #and when you update and extend list 2 then it will extended with new list1 and value will be as #[2,3,4,5, 1, 2, 3, 2, 3, 4, 5] print(List1) print(List2) This is why the output is like this way
25th Nov 2019, 2:44 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 4
Błack Jesus❕ it's showing expected output check it again delete trailing space that's invalid for the code might you have copied it from one editor to the app https://code.sololearn.com/clloOVO8UuBm/?ref=app
25th Nov 2019, 2:04 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 4
Because you added space on line number 4 and 7 after closing bracket ')' That's why it's showing invalid character. It's working after removing space https://code.sololearn.com/ctnUm9Arj27s/?ref=app
25th Nov 2019, 2:05 PM
A͢J
A͢J - avatar
0
i think it's solo learn ide problem because i tested this code on my python ide and it's accomplished without error
26th Nov 2019, 6:12 PM
Mohammad Gk
Mohammad Gk - avatar