Reduce, Reuse, Recycle Python
This tutorial shows various methods of reusing your Python code. The follow up tutorial on packaging code will explore ways to make code reusable by others.
import numpy as np
import matplotlib.pyplot as plt
Step 0: functions¶
Functions are the simplest way to cut down duplicated code …