'How do I add a serial no. to the file every time new user enters his data

#x = input('Enter info: ')

#file = open('newfile.txt', 'a')

#file.write(x) #file.close()



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source