Hi I already know how to open a file in python 3 but is there a way of opening a file in C:\Users\user\Documents (user is the user of the logged in computer). So I want to open a text file in any users Documents named something e.g. test.txt This file maybe on 3 computers and I want to open the file with the same name in many logons.
This is how you would normally open a file in python:
file = open("C:\Users\Rohit\Documents\text.txt", "r+")
file.close()
So is there a way to replace 'Rohit' with the user logged on e.g. Robert, Adam, Lewis, etc.