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
  • 7,683
  • 8
  • 34
  • 51
elirans
  • 1
  • 3

1 Answers1

0

append returns None.

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

Scott Hunter
  • 46,905
  • 10
  • 55
  • 92