I have such list:
setter_maping = ['14.99', '0.0', '226.95', '0.0', '14.99', 'None', '0.0']
How can I get such list (to remove all duplicates, zeros, Nones... in one word : to remove all what is not float number like 22.22 or 15.66 etc, if I will have there 0.0, or any thing that is not compatible with pattern of number.number (11.1 , 11.11) such value should be deleted):
result = ['14.99', '226.95']
I have done simple:
kick_off = ['None', '0.0']
[mapped_prices.remove(i) for i in set_map if i in kick_off]
But how to produce more unified pattern for removing wrong values? Can regex provide me solution? which regex will solve this? I have no experience with this module