I'm new to Python so apologies if this is a basic mistake, I'm trying to write certain information to a txt file (OS is windows).
I want to write "Platform architecture:" as text, and write the output of platform.architecture to a file. Here is my current code:
import.platform
file = open('C:\\Users\\user\\Desktop\\pc info.txt','w')
file.write('Platform architecture:'),platform.architecture
When I hit run a file named pc info is generated on my desktop as expected, but in the file only Platform architecture:
is produced as text.
It seems file. write platform.architecture()
isn't writing any information to the txt file?
Any ideas please?