I\'m taking a class in Algorithms and Data Structures (Python). In the book there is an example of a \"stack\" with methods that return certain values. In the book, these values
You can either
s=Stack() s.push(5) print s.size() print s.isEmpty() print s.peek()
or replace your return statements with print.
return
print