0

I would like to understand why when I'm using the a=(with append) the result is none. why the var list is none.

a = ['a','b','b']
b = 'y'
a = a.append(b)
print (a) ---result none
petezurich
  • 9,280
  • 9
  • 43
  • 57
elirans
  • 1
  • 4

1 Answers1

0

append returns None.

If you didn't do the assignment, a would have the 'y' appended to it.

Scott Hunter
  • 48,888
  • 12
  • 60
  • 101