Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#Import os Library import os #Encode filename encode = os.fsencode("/home/testuser/desktop/newfile.txt") #Print the encoded filename print(encode)
b'/home/testuser/desktop/newfile.txt'