MCPcopy Index your code
hub / github.com/careercup/ctci / __str__

Method __str__

python/Chapter 3/Question3_5/3_5.py:72–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 return self.stack.data
71
72 def __str__(self):
73 stack_copy = deepcopy(self)
74 tempHolder = []
75 while stack_copy.size > 0:
76 tempHolder.append(stack_copy.pop())
77 return ', '.join(map(str, tempHolder[::-1]))
78
79
80if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

appendMethod · 0.80
joinMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected