I am having trouble iterating through a list and applying an algorithm which changes certain values in that list to new ones. This is my current code. I keep getting errors in multiple ways ive tried to replace the values.
array=[0,1,2,34,44,55,343,22,11,66,44,33]
for x in array:
if x==0:
y='Nan'
array.replace(x,y)
if x==1:
y=0
array.replace(x,y)
if x==2:
y=1
array.replace(x,y)
if x >= 3 and x < 23:
y=(x-2)*50
array.replace(x,y)
if x >=23 and x <63:
y=(x-12)*100
array.replace(x,y)
if x == 63:
y=5500
array.replace(x,y)
if x >= 64 and x <= 67:
y=(x-58)*1000
array.replace(x,y)
if x >= 68:
y = 10000
array.replace(x,y)
print(array)