
'''simple docstring'''





def snake_case_    (				lowercase__      ,					lowercase__		):
  # The longer word should come first
  if len(lowercase__		) < len(lowercase__		):
    return levenshtein_distance(lowercase__      ,					lowercase__		)

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

  UpperCAmelCase__			:				List[Any]												=       list(range(len(lowercase__		) + 1		)		)

  for i, ca in enumerate(lowercase__		):
    UpperCAmelCase__			:				Any												=       [i + 1]

    for j, ca in enumerate(lowercase__		):
      # Calculate insertions, deletions and substitutions
      UpperCAmelCase__			:				Tuple												=       previous_row[j + 1] + 1
      UpperCAmelCase__			:				Optional[int]												=       current_row[j] + 1
      UpperCAmelCase__			:				Optional[int]												=       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__			:				Union[str, Any]												=       current_row

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


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

      SCREAMING_SNAKE_CASE    =					levenshtein_distance(first_word, second_word)
      print(F'Levenshtein distance between {first_word} and {second_word} is {result}')





'''simple docstring'''





from doctest import testmod
from math import sqrt







def snake_case_    (				lowercase__		):
  UpperCAmelCase__			:				list[int]												=       []
  if num < 1:
    return facs
  facs.append(1		)
  if num == 1:
    return facs
  facs.append(lowercase__		)
  for i in range(2      ,					int(sqrt(lowercase__		)		) + 1		):
    if num % i == 0:  # If i is a factor of num
      facs.append(lowercase__		)
      UpperCAmelCase__			:				Tuple												=       num // i  # num//i is the other factor of num
      if d != i:  # If d and i are distinct
        facs.append(lowercase__		)  # we have found another factor
  facs.sort()
  return facs


if __name__ == "__main__":
      testmod(name="""factors_of_a_number""", verbose=True)



