Python Technique: String Reversal with a Custom Stack class