Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # function that loads given .txt file and return is as list of lists
- def open_file(file_name)
- try:
- with open(str(os.path.abspath(__file__)+str(file_name)), "r") as f:
- lines = f.readlines()
- game_statistic_list = [element.replace("\n", "").split("\t") for element in lines]
- except IOError:
- print("%s does not exist in program directory" % file_name)
- return game_statistic_list
Add Comment
Please, Sign In to add comment