How to solve the problem of syntax error: (Unicode error)’unicodescape ‘codec can’t decode bytes in position 2-3: truncat


executing code reported the following error:
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncuxxxx escape
The solution is as follows:
1. Replace ‘\’ with double backslashes

2. Change ‘ ‘to forward slash

and that’s it!

Read More: