Some hidden set of Unicode characters appear in a string which needs to be removed.
I have a very large text which is extracted from a PDF file using PyPDF2 package. Now this extracted text has a lot of issues in it (like text in tables inside PDF which were structured will appear randomly when extracted) and lots of special characters also get embedded in it (like ~~~~~~~, }}}}}}}} etc) although those texts are not present when viewed as a PDF file. I tried removing those characters using the solution described in this, this and this link but the problem still appears
myText = "There is a set of hidden character here => <= but it will get printed in console"
print(myText)
Now I would like to have a clean text without those hidden characters.