fb pixel

Is almost equal

Two strings are considered almost equal if they differ in at most 2 locations.
Write a function that would return True if two strings are almost equal and False otherwise. Note that the strings might have different lengths!
The input contains two strings each on a separate line.
The program should print Yes if they are almost equal and No otherwise.
Input
helo
helloo

Output
No
Input
hello
helloo

Output
Yes
 
To check your solution you need to sign in
Sign in to continue