Skip to content

Instantly share code, notes, and snippets.

@acbart
Created September 6, 2022 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acbart/f0d00f2d6af7774a5ad4f29e9c1961ba to your computer and use it in GitHub Desktop.
Save acbart/f0d00f2d6af7774a5ad4f29e9c1961ba to your computer and use it in GitHub Desktop.
Simple code, easy to trace
from bakery import assert_equal
name = "Captain"
def shorten(word: str) -> str:
return word[:3]
assert_equal(shorten(name), "Cap")
assert_equal(shorten("Babbage"), "Bab")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment