return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or bytes-like object
re.sub 사용시 에러 어쩌구 저쩌구 return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or bytes-like object 나온다... 치환을 하고 싶어서 사용한 re.sub()가 구글링에선 많이 보이는데 오류가 난다? tag = re.sub('', '', tag) (태그를 제거 하고 싶었다) 말고 tag = re.sub('', '', '{}'.format(tag)) 잘 알고 있는 format을 써보자..
2020.07.01