What is the difference between list() and list?

fl rxjwg98 at gmail.com
Tue Jun 2 17:33:01 EDT 2015


Hi,

I find the following results are interesting, but I don't know the difference
between list() and list.






>>> nums=list()
>>> nums
[]
>>> xx=list
>>> xx
<type 'list'>
>>> nums
[]
>>> print(xx)
<type 'list'>
>>> print(nums)
[]
>>> 



Could you tell me that?

Thanks,



More information about the Python-list mailing list