Is it possible do the following initializations in one line? As I am quite curious whether a shorter code is possible.
X = []
Y = []
Is it possible do the following initializations in one line? As I am quite curious whether a shorter code is possible.
X = []
Y = []
You can initialize them using sequence unpacking (tuple unpacking in this case)
X, Y = [], []
because it's equivalent to
(X, Y) = ([], [])
You can also use a semicolon to join lines in your example:
X = []; Y = []