At most one edit

Write codeMedium20 minMeta style

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) -> bool
Example 1
Inputone_edit_away("pale", "ple")
OutputTrue