May-22-2020, 11:49 AM
with open('a.txt', 'r') as f2: data = f2.read() data=(data.split("\n")) data=[float(i) for i in data] dataWe first convert the string into list by using \n as delimiter. Then convert each element to float
could not convert string to float
|
|
Messages In This Thread |
could not convert string to float - by player1681 - May-22-2020, 09:32 AM
RE: could not convert string to float - by ibreeden - May-22-2020, 09:41 AM
RE: could not convert string to float - by player1681 - May-22-2020, 09:56 AM
RE: could not convert string to float - by hussainmujtaba - May-22-2020, 11:49 AM
RE: could not convert string to float - by buran - May-22-2020, 12:10 PM
|