Anonymous user
Compare length of two strings: Difference between revisions
→{{header|Python}}
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}}==
|