At most one edit
Your task
Given two lowercase strings a and b, determine whether they are at most one edit apart, where an edit is inserting a character, deleting a character, or replacing a single character. Identical strings count as zero edits (return true). Return true iff they differ by zero or one edit. Lengths up to a few thousand.
Examples
one_edit_away(a: str, b: str) -> boolExample 1
Input
one_edit_away("pale", "ple")Output
True