Let's say I have a string like this:
content ='''38%
46%
54%
62% 
70% 
78% 
86%'''
I want to wrap quotation marks around the values in each line. My attempt to do so is like so:
formatted_answers = re.sub("([^\s]+)", "'\1'", content)
print(formatted_answers)
But this returns
''
''
''
'' 
'' 
'' 
''
Can't see what I'm doing wrong
 
    