How would one change the string "Point" to be a variable input (string)?
result = []
list = [[a,b,c,d][a,b,c,d]]
result.append( [["Point {}".format(i) for i in range(1, len(sub)+1)] for sub in list])
I basically dont want to use string "Point" as a constant but rather as another parameter value. I tried this:
result = []
list = [[a,b,c,d][a,b,c,d]]
p_name = "Number"
result.append( [[p_name, {}.format(i) for i in range(1, len(sub)+1)] for sub in list])
I would like to end up with:
result = [[Number 1, Number 2, Number 3, Number 4][Number 1, Number 2, Number 3, Number 4]]
Thank you,
Number 1, a string, tuple, list?