Jump to content

Compare length of two strings: Difference between revisions

Line 171:
 
=={{header|Python}}==
<lang Python>def naive_compare_and_report_length(str1, str2):
if len(str1) > len(str2):
print('"' + str1 + '"', 'has length', len(str1), 'and is longer')
Line 204:
print('Sophisticated')
compare_and_report_length(A, B)
print()</lang>
 
=={{header|Raku}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.