Skip to content

Instantly share code, notes, and snippets.

@timo-boehm
Created June 13, 2020 08:52
Show Gist options
  • Save timo-boehm/dcb9de028aa317178e61cc369b55f304 to your computer and use it in GitHub Desktop.
Save timo-boehm/dcb9de028aa317178e61cc369b55f304 to your computer and use it in GitHub Desktop.
def scores(name, score, records = dict()):
records = dict() if not records else records
records[name] = "passed" if score > 60 else "failed"
return records, id(records)
print(scores("Timo", 55)) # ({'Timo': 'failed'}, 140216484423152)
print(scores("Andy", 80)) # ({'Andy': 'passed'}, 140216484423232)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment