

'''simple docstring'''




def  lowerCamelCase__						(  SCREAMING_SNAKE_CASE :				Dict    ,				SCREAMING_SNAKE_CASE :				List[Any]  ):





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

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

		UpperCAmelCase  							=		list(range(len(A_  ) + 1  )  )

		for i, ca in enumerate(A_  ):
				UpperCAmelCase  							=		[i + 1]

				for j, ca in enumerate(A_  ):
						# 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(A_    ,				A_    ,				A_  )  )

				# Store the previous row
				UpperCAmelCase  							=		current_row

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


if __name__ == "__main__":
		_a			:	List[str]								=  input('Enter the first word:\n').strip()
		_a			:	Dict								=  input('Enter the second word:\n').strip()

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





'''simple docstring'''




from collections import namedtuple

_a			:	int								=  namedtuple('from_to', 'from_ to')

_a			:	Dict								=  {
    'atm': from_to(1, 1),
    'pascal': from_to(0.0000098, 101_325),
    'bar': from_to(0.986923, 1.01325),
    'kilopascal': from_to(0.00986923, 101.325),
    'megapascal': from_to(9.86923, 0.101325),
    'psi': from_to(0.068046, 14.6959),
    'inHg': from_to(0.0334211, 29.9213),
    'torr': from_to(0.00131579, 760),
}


def  lowerCamelCase__						(  SCREAMING_SNAKE_CASE :				float    ,				SCREAMING_SNAKE_CASE :				str    ,				SCREAMING_SNAKE_CASE :				str  ):
  if from_type not in PRESSURE_CONVERSION:
    raise ValueError(
        f'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
        + ', '.join(SCREAMING_SNAKE_CASE  )  )
  if to_type not in PRESSURE_CONVERSION:
    raise ValueError(
        f'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
        + ', '.join(SCREAMING_SNAKE_CASE  )  )
  return (
      value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
  )


if __name__ == "__main__":
  import doctest

  doctest.testmod()


