i have a list like:
list=['2,130.00','2,140.00','2,150.00','2,160.00']
i would like to use a function like
def f(iterable):
yield from iterable
and applying
float(item.replace(',','')) for item in iterable
at the same time so that
f(list)
returns
[2130.00,2140.00,2150.00,2160.00]
I know
[float(x.replace(',','')) for x in list]
works here but it is to understand how to use yield from in a function and modifying items in the iterable at the same time. Maybe i have to use *args and/or **kwargs in the function but not sure i have and how to.