[Solved] Can i include multiple statements when creating a one-line for loop?

[ad_1]

You can use a string comprehension:

numbers = [float(p.replace('€','').replace('M','')) for p in a]

which gives:

[110.5, 210.5, 310.5]

[ad_2]

solved Can i include multiple statements when creating a one-line for loop?