News

Working with files in Python is pretty easy. But there’s a common mistake that can sneak into your code. Not closing the file ...
x = np.array([_ for _ in range(1000)]) This works, but its performance is hidebound by the time it takes for Python to create a list, and for NumPy to convert that list into an array.