Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- deleted = 0
- allLength = sum(1 for line in open('C:/Users/Nathan/PycharmProjects/untitled/Wiki Input.txt'))
- with open('C:/Users/Nathan/PycharmProjects/untitled/Wiki Input.txt', 'r') as fileContents:
- for i, line in enumerate(fileContents, 1):
- if "--" in line:
- deleted += 1
- if "* LATER" in line:
- allLength = i
- print(str(round((100.0 / float(allLength)) * deleted)) + "% complete pre-mission, " + str(round((100.0 / float(sum(1 for line in open('C:/Users/Nathan/PycharmProjects/untitled/Wiki Input.txt'))) * deleted))) + "% complete total")
Advertisement
Add Comment
Please, Sign In to add comment