I have made a code which asks the users name and age. It asks age and stores it using :
name = input("")
And the name uses the same. I have outputted the age to file like so:
f = open('UserDetails')
f.write (name)
f.write (age)
f.close ()
I would like to be able to format this as in the file it just appears like:
James42Brian20Charlie56
I would like to make it be like :
James 42
Brian 20
Charlie 56
How would I do this?