The true essence of hacking is refactoring.

This code taken from Automate the Boring stuff in Python is my first love into refactoring. It’s like being lovestruck <3

r = random.randit(1,9)
fortune = getAnswer(r)
print(fortune)

Simple, but this will be the code that will start my obsession into refactoring land:

print(getAnswer(random.randint(1,9)))

My first love: refactoring aka alFougy invented the remix

Category: Notes
224 views