-4

I am trying to remove the ' ' in my list by using the repr function but it is not removing the ' '

code: output: output

input

jarey249
  • 1
  • 1
  • 1
    Please include code and errors as text and not as images. – ewokx Mar 21 '22 at 05:49
  • 1
    The '' means that the elements in your list are strings. Change each element as an int. – ewokx Mar 21 '22 at 05:51
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 21 '22 at 07:01

1 Answers1

2

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.

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30