I wanted to add a word to my list so the following code works.
text = 'A quick brown fox jumps over the lazy dog'
x = text.split()
print(x)
x.append('cat')
print(x)
But when I assign >> x.append('cat') << to another variable y, my code is evaluated to None. Why is that so? Shouldn't they both give me the same output? Code is as follows...
text = 'A quick brown fox jumps over the lazy dog'
x = text.split()
print(x)
y = x.append('cat')
print(y)