26 ms·
Nice! It could probably benefit from passing the file as an argument: import sys file = sys.argv[1] instead of call to input() You could probably do:
by roveo 5y ago
Nice! It could probably benefit from passing the file as an argument:
import sys
file = sys.argv[1]
instead of call to input()
You could probably do:
if len(sys.argv) > 1:
file = sys.argv[1]
else:
file = input(...)
- mikub 5y agoOh wow, that's a nice improvement. Thank you.