Bactobio interview question

Solve a coding challenge in Python.