How to add new value to a list without using 'append()' and then store the value in a newly created list?

后端 未结 4 768
臣服心动
臣服心动 2021-01-11 10:33

I have been trying this a lot.

>>> x = [4,5]
>>> y = x.append(7)
>>> print y
None
>>>print x
[4, 5, 7]

4条回答
提交回复
热议问题