How to read comma-separated numbers in a text file?

Asked

Viewed 95 times

1

Hey, guys, hey, hey, hey, guys!.

Next,I have an archive where I have several comma separated values.I need to turn these values in a list,and even then it’s quiet. The point is that using the python split method to separate by commas, he returns to me a list in which each value becomes a single quote string And in that way, I just don’t get to do what I need to do. For example:

I have in my file a line like this:

0,1,2,3,4,5,6,6,7,8,9

then I split it and it’s like this:

['1','2','3','4','5','6','7','8','9']

Does anyone know how I can make it back in one piece without the quotation marks ?

Thanks for the help!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.