How to add readable (r) to a string?

enter image description hereI have issues using the path of my file because it contains \ so I'm obliged to either add r or swap the \ with double \

The problem is that I want to add the r to a string stored in a variable without doing it manually (I get the variable which contains the path with an Input() ). How could I do that ?

EDIT : Here is the code :

#The path of my directory
direc =str(input())
list = os.listdir(direc) #This gives me the name of all the files in my directory

cap = cv2.VideoCapture(the path of my directory \list[0]) #path of the file, this is where I have trouble
length = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
print(length)