python – How to do a while loop with counter

I want to make this clean and shorter and I was wondering how I can do it? While loop would be best but how do i implement it?

if line.startswith('ACME'):
        if counter == 2:
            compname, value = line.split('(')
            value = float(value(0:-14))
            products(f'{compname}') = value
        if counter == 3:
            compname, value = line.split('(')
            value = float(value(0:-14))
            products(f'{compname}') = value 
        if counter == 4:
            compname, value = line.split('(')
            value = float(value(0:-14))
            products(f'{compname}') = value
        if counter == 5:
            compname, value = line.split('(')
            value = float(value(0:-14))
            products(f'{compname}') = value 

”’