Home python Re.Sub error: "Typeerror: Expected String or Bytes-Like Object"

Re.Sub error: “Typeerror: Expected String or Bytes-Like Object”

Author

Date

Category

Error:

return _compile (Pattern, Flags) .Sub (Repl, String, Count)
Typeerror: Expected String Or Bytes-Like Object

should work


Answer 1, Authority 100%

Just remove the MYSTR of square brackets:

mystr = '234egfdgf'

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions