If I have a list:
ex_list = [x,y,z]
but I want to have
[x, y, z, ]
How do I do it? I tried:
ex_list.append(None)
but that doesn't work.
The concept of null does not exist in Python. The closest related idea would be None, which can be appended just as you indicated:
ex_list.append(None)
which would result in
[x, y, z, None]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With