I\'m wondering how to use an f-string whilst using r to get a raw string literal. I currently have it as below but would like the option of allowing any name to rep
r
You can combine the f for an f-string with the r for a literal.
f
user = 'Alex' dirToSee = fr'C:\Users\{user}\Downloads' print (dirToSee) # prints C:\Users\Alex\Downloads