I was searching for a Python style guide in terms of "intermittent variables" and readability. The code that I develope will be mainly used by non-programming-experts, so it should be easy to read, but on the other hand, I would like to learn standard Python style.
A simple example:
import numpy as np
a = [2,3,5,4]
b = [2,2,2,2]
#Version 1
a1 = np.array(a)
b1 = np.array(b)
a2 = np.transpose(a1)
b2 = np.transpose(b1)
c = np.vstack((a2,b2))
#Version 2
c1 = np.vstack((np.transpose(np.array(a)), np.transpose(np.array(b))))
I guess in this case, Version 2 is not really hard to read, but I hope you know what I mean.
- What is the correct word for this "intermittent variables" (if there is one)? Is there a something available like a style guide?
- Is there a big difference in terms of computation time (Version 1 vs. Version 2)?