dataset:
raw_data = [[1, John, 23, 32], [1, Jane, 10, 20], [1, Max, 90, 70], [2, Harry, 32, 56]]
list = []
for i in raw_data:
if i[0] in list:
x = i[0] + 0.1
list.append(x)
else:
list.append(i[0])
I would actually like to obtain list = [1, 1.1, 1.2, 2]
However, my code is giving my list = [1, 1.1, 1.1, 2]
How can I run another loop in my list to add a 0.1 to a duplicated number?