I get the location of the file system = os.path.dirname(os.path.abspath(__file__))

print(format(system),"\\person\\age1\\{0}".format(name1))

I get C:\Users\Tom\Desktop\tests \person\age1\Gulag How to remove a space?

    1 answer 1

    Instead

     print(format(system),"\\person\\age1\\{0}".format(name1)) 

    (two parameters with a comma between them)

    use

     print(format(system) + "\\person\\age1\\{0}".format(name1)) 

    (one parameter - instead , the + sign to connect 2 lines in 1)

    because print() inserts a space between parameters.