I saw here https://stackoverflow.com/a/35651859/6824121 that you can launch python script directly in your terminal in windows like this:
> python -c exec("""import sys \nfor r in range(10): print('rob') """)
Which works perflectly.
I tried to launch this command:
> python -c exec("""test = r'C:\Users\alexa\Downloads\_internal'""")
And I got error:
File "<string>", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 11-12: truncated \UXXXXXXXX escape
As in this question "Unicode Error "unicodeescape" codec can't decode bytes... Cannot open text files in Python 3
But I used raw string
so I don't know why I still got the error.
What am I missing here ?
I'm using Python 3.6.8
even though I don't think this is related to the version of python.