I am currently programing in python and I created a method that inputs list from the user, without knowing whether he is multidimensional or one dimensional. how do I check? sample:
def __init__(self,target):
for i in range(len(target[0])):
w[i]=np.random.rand(len(example[0])+1)
target is the list. the problem is that target[0] might be int.