P
pipehappy
I come this code:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information..... def __str__(self):
.... return "He"
....
0x00BE9370>, <__main
__.He object at 0x00BE93B0>] # I expect output: [He,He,He]
Do anyone know trick to overcome this or python has some proposal to
extend print that can do iterately print? I just want to get the way of
print which I my guess. Thanks a lot!
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information..... def __str__(self):
.... return "He"
....
[<__main__.He object at 0x00BE92D0>, <__main__.He object athes = [He(),He(),He()]
print hes
0x00BE9370>, <__main
__.He object at 0x00BE93B0>] # I expect output: [He,He,He]
print hes[0] He
Do anyone know trick to overcome this or python has some proposal to
extend print that can do iterately print? I just want to get the way of
print which I my guess. Thanks a lot!