I have a length as 5 and my_name=A
I want to create a list with a length of 5 and the items should contain my_name
My desired output is,
length=5
my_name="A"
desired_list=["A1","A2","A3","A4","A5"]
I tried adding like below,
desired_list=[]
for i in range(length):
desired_list.append(my_name+str(i+1))
But I want a solution in a single line.