Python Theoretical Question I'd like to learn theory behind why "print(i.extend(j))" DOESN'T work. It's OUTPUT is: "None". print(j) DOES work (It's OUTPUT is: "[4, 5, 6, 7, 8, 9]")
i = [1, 2, 3]
j = [4, 5, 6]
k = [7, 8, 9]
# I'd like to learn theory as to why following doesn't work
# OUTPUT is: "None"
print(i.extend(j))
# Following does work (OUTPUT is: "[1, 2, 3, 4, 5]")
j.extend(k)
print(j)