0

How to create and add attribute to object in Python?

In android I have qpython3 and it doesn't include clear() attribue in 'list' object. How can I do? Help me guys. Thanks,

19th Jan 2017, 3:47 PM
Seng Thai
Seng Thai - avatar
2 odpowiedzi
+ 5
In original Python console its easy ...i think it may not possible on qpython3 until the developers add it....
19th Jan 2017, 4:28 PM
Sun
Sun - avatar
+ 1
Well, that's weird... You can code your own function and attach it to list.clear using : list.clear = clear Where clear is your function.
19th Jan 2017, 7:55 PM
Amaras A
Amaras A - avatar