-1
us = getpass.getuser()  

path = r"C:\Users\<content of "us">\Desktop\Utenti"

How can i do it?

Laurenz Albe
  • 167,868
  • 16
  • 137
  • 184
Alexreb04
  • 1
  • 1
  • 1
    Possible duplicate of [Python's many ways of string formatting — are the older ones (going to be) deprecated?](https://stackoverflow.com/questions/13451989/pythons-many-ways-of-string-formatting-are-the-older-ones-going-to-be-depre) – manveti Aug 22 '19 at 23:35

1 Answers1

0

I solved it in this way

us = getpass.getuser()

path = r"C:\Users\%s\Desktop\Utenti" %(us)
Alexreb04
  • 1
  • 1