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) #Print the decoded filename print(os.fsdecode(encode))
b'/home/testuser/desktop/newfile.txt'
/home/testuser/desktop/newfile.txt