I am trying to remove the ' ' in my list by using the repr function but it is not removing the ' '
code: output: output
I am trying to remove the ' ' in my list by using the repr function but it is not removing the ' '
code: output: output
The quotes mean that those are strings, not integers. If you want them to be integers, you have to convert them:
mylist = list(map(int,mylist))
I would also point out that repr
is not intended to be final output. It's used for debugging and intermediate results. If you need a specific format, then YOU need to build the specific format you want.