I have these two lines in an old Perl script. When I write the Python equivalent I get all sorts of errors like valueerror: invalid \x
escape, and stuff about encoding.
$line =~ s/[^\x{8}-\x{7B}]/ /ig;
$line =~ s/(Û|²|°|±|É|¹|Í)/ /g;
What do I need to do to get them working in Python?