+ 1
Take a look! What is the effect of the code "list.__init__([ ])"?
class Mylist(list): def __init__(self,a_name): list.__init__([ ]) self.name=a_name
5 Respostas
+ 7
It lets you initialize a variable, with the initialized variable having a value of an empty list
+ 2
@James I mean even though there is no "list.__init__([ ])", I am still able to use methods like append,extend...etc
+ 1
@Pegasus but if I delete that line of the code, it make no difference when I give it to a variable.
+ 1
I am still not clear about that.
+ 1
@James Could you explain that to me?