Skip to content

Instantly share code, notes, and snippets.

@walkerdb
Created November 21, 2015 22:59
Show Gist options
  • Select an option

  • Save walkerdb/2b00240c80e9b0adf446 to your computer and use it in GitHub Desktop.

Select an option

Save walkerdb/2b00240c80e9b0adf446 to your computer and use it in GitHub Desktop.
# first, we'll define the original extent statement, something we
# might find in an average EAD <extent> tag
basic_extent_raw_text = "4 linear feet and 1 oversize volume."
# then let's define the list of objects we want to transform that into
basic_extent_target_output = ["4 linear feet", "1 oversize volume"]
# run the (currently unwritten) code to transform the input text,
# and store the result in a new variable
split_extent_text = split_extents(basic_extent_raw_text)
# test whether the result is exactly equal to our desired output
assert split_extent_text == basic_extent_target_output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment