Do you even Refactor? 003

Code refactoring is crucial but often overlooked. It can improve the design and performance of existing code.

The Python code below takes about 14 seconds to complete. Refactor the getData function to make it run in less than 10 seconds. Post your answer in the comments.

--

--

Become a rockstar programmer and try to reach genius status on codr https://nevolin.be/codr/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store