Suleman Jaffar Suleman Jaffar -5 years ago 238
Python Question

Saving from python to an Excel

For example, when it generates the random number, I want it to save the number on to a different file in the same folder.

Answer Source

You just need to create a text file in which the values are separated by commas.

Try this:

from random import randint
print("Your problem has been stored. We have allocated a case number which will be sent off to a technician. Please take a note of your case number: ", randint(0,1000000000))
with open("random.csv", "w") as fp:
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download