Dark Hypernova
Science and Fiction

Today I Learned

Assigning Values to Multiple Variables

In python, assigning values to several variables can be done in a compact way using list manipulation.

x1 = np.zeros(30)
v1, w1, u1 = np.split(x1,3)[:3]
print v1, w1, u1

A Random #TIL# for You

By OctoMiao

Last updated