Ad

Friday, March 30, 2018

Object Oriented Programming with Python

Define a Stack class, just the skeleton, illustrates how classes are implemented in Python. Lower case self, is the first argument to methods.

Class Stack:
def __init__(self):
pass
def is_empty(self):
pass
def push(self, value):
pass
def pop(self):
pass

No comments:

Post a Comment

Convert Tensorflow 1.0 to Tensorflow 2.0

Specify Tensorflow version in Google Colab `%tensorflow_version 2.x`. It is not recommended to use pip install in Google Colab: quote &quo...