Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 2_if2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ def comapre_str(string1, string2):

if len1 == len2:
return 1
elif len1 > len2 and string2 != 'learn':
elif len1 > len2:
return 2
elif string2 == 'learn':
elif string2 == 'learn' and string2 != 'learn':
Comment thread
aka-nomad marked this conversation as resolved.
Outdated
return 3
else:
return 'No rule for such combinations'
else:
return 0

for i in range(0, 4):
x = {0:1, 1:'Python',2:'hello', 3:'python3'}
x = {0:1, 1:'Learn',2:'hello', 3:'python3'}
y = {0:'Python', 1:'learn',2:'hello', 3:'PYTHON'}
result = comapre_str(x[i], y[i])
print(result)
Expand Down