My requirements: [[R,88],[A,85],[S,78]]
My code:
n =int(input())
lst = []
for i in range(n):
print("Enter Name " + str(i+1))
lst.append([input()])
for j in range(i,i+1):
print("Enter Score " + str(j+1))
lst.append([float(input())])
print(lst)
My results: [[R],[88],[A],[85],[S],[78]]
I would like to do it using for loops preferably, i know there might be easier ways to do it using list comprehensions and stuff but the fact of the matter is that I'm new to coding and I'm yet to cover those topics. Would appreciate if someone could show me how to do it using for loops.
I'm new to the space so apologies in advance if I'm not following the standard practices or playing by the rules :p
lst.append([float(input())])tolst[i].append(float(input()))?[ ]in my 2nd example.