When I try print([2,3].append(5))
, I get NONE as my output. Why is that? I expected to get [2,3,5].
Asked
Active
Viewed 27 times
0
-
1Does this answer your question? [Why does append() always return None in Python?](https://stackoverflow.com/questions/16641119/why-does-append-always-return-none-in-python) – SuperStormer Jun 22 '22 at 05:11
-
Its because `append()` is a function call , which does not return anything. – Kris Jun 22 '22 at 05:11