Plenty of IDs
by in CodeSOD on 2026-11-10Venkat joined a new team in the middle of a big refactoring effort. The code was quite a mess, glued together by long Python scripts with main functions longer than a Tolstoy novel. It was this effort to clean up the code into neat modules that highlighted some logical issues with their implementation.
def generate_random_number():
""" Generate a 5 digit random number.
"""
return "".join(map(str, random.sample(range(0,10),5)))
