


def 		_A		(		_lowercase				,     _lowercase   )				->   int:


     """simple docstring"""


     if len(_lowercase   ) < len(_lowercase   ):
          return levenshtein_distance(_lowercase				,     _lowercase   )

     if len(_lowercase   ) == 0:
          return len(_lowercase   )

     __UpperCamelCase   = list(range(len(_lowercase   ) + 1   )   )

     for i, ca in enumerate(_lowercase   ):
          __UpperCamelCase   = [i + 1]

          for j, ca in enumerate(_lowercase   ):
               # Calculate insertions, deletions and substitutions
               __UpperCamelCase   = previous_row[j + 1] + 1
               __UpperCamelCase   = current_row[j] + 1
               __UpperCamelCase   = previous_row[j] + (ca != ca)

               # Get the minimum to append to the current row
               current_row.append(min(_lowercase				,     _lowercase				,     _lowercase   )   )

          # Store the previous row
          __UpperCamelCase   = current_row

     # Returns the last element (distance)
     return previous_row[-1]


if __name__ == "__main__":
    __snake_case             =	input('''Enter the first word:\n''').strip()
    __snake_case             =	input('''Enter the second word:\n''').strip()

    __snake_case             =	levenshtein_distance(first_word, second_word)
    print(f"""Levenshtein distance between {first_word} and {second_word} is {result}""")






from __future__ import annotations






def 		_A		(		_lowercase   )				->   int | float:


     """simple docstring"""


     if len(_lowercase   ) == 0:
          raise ValueError('find_max() arg is an empty sequence'   )
     __UpperCamelCase   = nums[0]
     for x in nums:
          if x > max_num:
               __UpperCamelCase   = x
     return max_num


if __name__ == "__main__":
    import doctest

    doctest.testmod(verbose=True)


