-2
us = getpass.getuser()  

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

How can i do it?

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
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)
Vega
  • 27,856
  • 27
  • 95
  • 103
Alexreb04
  • 1
  • 1