How to write backslash from input?

Hello! There is a script to replace the desktop Wallpaper depending on the time of day, although in General it is not particularly important. One problem and it came at a moment when I wanted to port this script on Windows (yeah, masochism, you know.) Breaking all the jambs and fun of Windows (well I thought) decided to gash the function to set the path of images.
And now, to the point:
some_image = input("enter the path, etc.")
But in Windows the path is represented with a backslash, i.e. " \ " and in the code with this symbol another conversation. That is, if the user enters a path, it POPs up an error. And if he enters just "\\", the registry records the Windows path with "\\". I don't play with replace(), could not bring to mind.
PS When I hardcode way hammered all worked perfectly...
Thank you all for the help, and that he's already with the Windows all the nerves were put
June 10th 19 at 15:26
1 answer
June 10th 19 at 15:28
from os import listdir

b = input("Enter the directory: ")
a = listdir(b)


Or in one row do as you please.
It's a piece of my code, I need to count the number of files in a folder, but maybe would suit you.
In any case, look at a library os

Find more questions by tags Python