This is a follow on from a previous question.
I've loaded a word list in Python, but there is a problem. For example, when I access the 21st item in wordlist
I should get "ABACK"
. Instead I get:
wordlist[21]
"'ABACK\\n',"
So for each word in wordlist
I need to trim "'"
off the front, and "\\n',"
off the back of every string in wordlist
. I've tried different string methods but haven't found one that works yet.