I have a list which has a range of numbers from 0 to 1:
[0.01,0.1,0.4,0.034,0.6,0.7,0.9,1]
How would I be able to edit the list so all the numbers from 0-0.5 to 0.4 and change all the numbers from 0.6-1 to 0.7, so the list becomes:
[0.4,0.40.40.4,0.7,0.7,0.7,0.7]
confindencenumbers = [(x=0.4) for x in confindencenumbers if x < 0.4]
confindencenumbers = [(x=0.7} for x in confindencenumbers if x > 0.5]