Skip to main content
added 7 characters in body
Source Link
gecco
  • 19k
  • 11
  • 53
  • 68

You change toYou're changing the value of the variable i -> The content of the array a does not change! If you want to change the values in the array, you should rather implement it like this:

for index, value in enumerate(a):
    try :
        a[index] = float(value)
    except ValueError :
        pass

You change to value of the variable i -> The content of the array a does not change! If you want to change the values in the array you should rather implement it like this:

for index, value in enumerate(a):
    try :
        a[index] = float(value)
    except ValueError :
        pass

You're changing the value of the variable i -> The content of the array a does not change! If you want to change the values in the array, you should rather implement it like this:

for index, value in enumerate(a):
    try :
        a[index] = float(value)
    except ValueError :
        pass
Source Link
gecco
  • 19k
  • 11
  • 53
  • 68

You change to value of the variable i -> The content of the array a does not change! If you want to change the values in the array you should rather implement it like this:

for index, value in enumerate(a):
    try :
        a[index] = float(value)
    except ValueError :
        pass