Saturday, 18 April 2020

python class __ or private class component



When any class component has a name starting with two underscores (__), it becomes private - this means that it can be accessed only from within the class.

python find length of stack

class Stack:
    def __init__(self):
        self.stackList = [1,2,3]

stackObject = Stack()
print(len(stackObject.stackList))

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...