Exception-Based Switch-Case in Python

Here is yet another way to emulate a switch-case statement, perhaps one you might not have thought of. Read more

Similar

Solving Tribonacci Sequence with Python

The challenge As the name may already reveal, it works basically like a Fibonacci, but summing the last 3 (instead of 2) numbers of the sequence to generate the next. So, if we are to start our Tribonacci sequence with [1, 1, 1] as a starting input (AKA s... (more…)

Read more »