Longest string challenge: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: added/changed comments and whitespace, used a template for the output. |
|||
Line 1,677:
<lang python>import fileinput
# This returns True if the second string has a value on the
# same index as the last index of the first string. It runs
# faster than trimming the strings because it runs len once
# and is a single index lookup versus slicing both strings
# one character at a time.
def longer(a, b):
return
except:
return True
longest, lines = '', ''
|