I want to replace the first equals sign in each line with a comma, and leave the second occurrence of an equals sign alone.
I have attempted a for loop in which I find the index of the character and replace it with a comma, but I cannot select the correct equals sign or replace it.
lines = ['Temp = 65 ; Temperature = degrees Fahrenheit',
'Mass = 15 ; Mass = kilograms '
]
for line in lines:
i = line.index('=')
line.replace('i[1]' , ',')