manage your data
def get_from_store(): all_athletes = {} try: with open('athletes.pickle', 'rb') as athf: all_athletes = pickle.load(athf) except IOError as ioerr: print('File error (get_from_store): ' + str(ioerr)) return(all_athletes) def get_names_from_store(): athletes = get_from_store() response = [athletes[each_ath].name for each_ath in athletes] return(response)
Remember: there’s no requirement to maintain the existing API.
you are here 4 329