I have two strings, a and b, and I can use a.index(b) to find the index of string b in string a.
a = """
Hello! This is a string which I am using to present a quesion to stackoverflow because I ran into a problem.
How do I solve this?
If anyone knows how to do this, please help!
"""
b = "How do I solve this"
idx = a.index(b)
But when string b is not exactly a slice of string a, this does not work. For example when string b is:
b = "How fo I solve rhis"
I want a way using which we can find the index of b in a when the number of "mismatched" characters is at max 5.