mirror of
https://github.com/luong-komorebi/Awesome-Linux-Software.git
synced 2024-10-01 01:45:42 -04:00
Identity is not the same things as equality in Python
This commit is contained in:
parent
d6f40dfcdf
commit
7f34998dab
@ -54,7 +54,7 @@ def main():
|
||||
line = line.strip()
|
||||
items.append(line)
|
||||
# When no more items, blank line or new header
|
||||
elif line is '\n':
|
||||
elif line == '\n':
|
||||
# when we meet the next header, we should stop adding new item to the list.
|
||||
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
||||
# write the ordered list to the temporary file.
|
||||
|
@ -54,7 +54,7 @@ def main():
|
||||
line = line.strip()
|
||||
items.append(line)
|
||||
# When no more items, blank line or new header
|
||||
elif line is '\n':
|
||||
elif line == '\n':
|
||||
# when we meet the next header, we should stop adding new item to the list.
|
||||
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
||||
# write the ordered list to the temporary file.
|
||||
|
@ -54,7 +54,7 @@ def main():
|
||||
line = line.strip()
|
||||
items.append(line)
|
||||
# When no more items, blank line or new header
|
||||
elif line is '\n':
|
||||
elif line == '\n':
|
||||
# when we meet the next header, we should stop adding new item to the list.
|
||||
for item in sorted(items, key=lambda x: regex.findall(x.upper())[len(regex.findall(x.upper()))-1]):
|
||||
# write the ordered list to the temporary file.
|
||||
|
Loading…
Reference in New Issue
Block a user