Python Tricks #2: Emulating Switch/Case in Python

► Write Clean & Beautiful Python: Python doesn’t have switch/case statements so it’s often necessary to write long if/elif/e…


How to Reverse a Linked List in Python

It’s important to know about data types and one that comes up fairly regularly is that of Linked Lists. Let’s write the following base code to create a Linked List. Now that we have a base class, let’s insert a couple of nodes and print it out to see what... (more…)

Read more »