Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def setFile():
- # Create file if it does not exist
- openingFile = open('talents.txt', 'a')
- openingFile.close()
- # Read file
- openingFile = open('talents.txt', 'r')
- read = openingFile.read()
- # Check for nothing
- if read == '':
- openingFile.close()
- openingFile = open('talents.txt', 'w')
- openingFile.write("100")
- # Check for 0
- if read == '0':
- openingFile.close()
- openingFile = open('talents.txt', 'w')
- openingFile.write("100")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement