Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

push in python

class List(list):
    def push(self, x):
        self.append(x)
        
s = List()
s.push(10)
s.push(20)
>>> s
[10, 20]

#or you can direct do:
a = []
a.append(10)
>>> a
[10]
 
PREVIOUS NEXT
Tagged: #push #python
ADD COMMENT
Topic
Name
7+3 =