Introduction to Python

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.
helo helloo
hello helloo


Time limit: 0.2 seconds

Memory limit: 512 MB

Output limit: 1 MB

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