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
Alternatively, you could use the str.format() method.
str.format()
name = input("What is your name? ") print(r"C:\Users\{name}\Downloads".format(name=name))
This will format the raw string by inserting the name value.
name