Python Где необходимо исправить?
При выводе код ругается

Enter two strings:
ттттт
а
Traceback (most recent call last):
line 10, in
if strings_deff == 0:
NameError: name 'strings_deff' is not defined


А это кодик,что там не так?

def get_string_length_diff(string1,string2):
return len(string1)-len(string2)
print("Enter two strings:")

f_string = input()
s_string = input()
strings_diff = get_string_length_diff(f_string, s_string)


if strings_deff == 0:
print('Strings are equal length.')
elif strings_deff > 0:
print(f'First string is longer by { (strings_diff) } characters.')
else:
print(f'Second string is longer by { (strings_diff) } characters.')
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.