Hello Everyone! A simple questions!

Thanatos xiao yanxiaopei199 at gmail.com
Fri Jul 26 02:19:25 EDT 2013


Thanks
I just surprised by three dot
2013年7月26日 Florian Baumgartner <bfloriang at gmail.com>
> As alex23 already indicated you created a recursive data-structure (by
> inserting a reference to the list into the second place of the list) and
> the interpreter handles this gracefully by showing [...].
>> In case you really want to insert the lists members into the second place
> you can assign a copy of the list.
>> values = [0,1,2]
> values[1] = values[:]
>>>>>> 2013年7月26日 Thanatos xiao <yanxiaopei199 at gmail.com>
>>> >>> values = [0, 1, 2]>>> values[1] = values>>> values[0, [...], 2]
>>>> why??
>>>>>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>>>>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130726/47aa1a6c/attachment.html>


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /