A Comprehensive Guide to Implementing Stacks in Python