+ 2

Can someone explain, why it is None.Plss

a =[1,5,7] b=[2,4,6] C=a.extend(b) print(c) Output=None.

14th Feb 2020, 2:12 PM
CyberMan
CyberMan - avatar
3 Answers
+ 5
a.extend(b) returns None. Here is the right code: a = [1, 5, 7] b = [2, 4, 6] a.extend(b) print(a) If what you wanted is to make a new variable c, then simply: c = a + b
14th Feb 2020, 2:15 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 4
I fixed your code. See this code: https://code.sololearn.com/cQx5DhPgpwRk/?ref=app
14th Feb 2020, 2:44 PM
Pedro H.J
Pedro H.J - avatar
0
Case sensitive dude
16th Feb 2020, 7:44 AM
Huzaifa Khilawala
Huzaifa Khilawala - avatar