i'd like create in python a matrix with all zeros except for some value selected from a list. For example (very stupid) from
l=[0,1,2,3]
i'd like create a matrix (a list of list) with the letter "x" in position l[0] l[1]
etc.. like this:
[x, 0, 0, 0]
[0, x, 0, 0]
[0, 0, x, 0]
[0, 0, 0, x]
i'd like make it interactive, with a variable length (not always 4) maybe giving on input