Minor code fix
This commit is contained in:
4
sort.py
4
sort.py
@ -68,7 +68,9 @@ def main():
|
|||||||
|
|
||||||
with open('README.md', 'w+') as sorted_file:
|
with open('README.md', 'w+') as sorted_file:
|
||||||
# Then all of the blocks are sorted individually
|
# Then all of the blocks are sorted individually
|
||||||
blocks = [''.join(sorted(block, key=lambda s: s.lower())) for block in blocks]
|
blocks = [
|
||||||
|
''.join(sorted(block, key=str.lower)) for block in blocks
|
||||||
|
]
|
||||||
# And the result is written back to README.md
|
# And the result is written back to README.md
|
||||||
sorted_file.write(''.join(blocks))
|
sorted_file.write(''.join(blocks))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user