Skip to content
Snippets Groups Projects
Commit eb61de54 authored by nilsl99's avatar nilsl99
Browse files

Fixed __str__

parent 786815ee
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ class Stack(list):
max_length = len(str(max(self.stack, key=lambda x: len(str(x)))))
result = ""
vert = "\u2502"
for ele in self.stack:
for ele in reversed(self.stack):
result += vert + str(ele).rjust(max_length) + vert + "\n"
return result + "\u2514" + "\u2500"*max_length + "\u2518"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment