0

I have a list of strings that were read from a .txt file, and each string was framed by quotes"". Is there a reason .rstrip does not work to remove quotes? Is there a better method for removing the quotes? Example code below:

NewList = ['"first"','"second"','"third"']
for x in NewList:
    x.strip('"')
    print(x)

Output:

"first" "second" "third"

0 Answers0