Modernize code to Python 3.6+ and some cleanup
This commit is contained in:
@@ -34,10 +34,10 @@ def main() -> None:
|
||||
label = 'P' if prime else ' '
|
||||
print(f'{n:16} {label} {elapsed:9.6f}s')
|
||||
|
||||
|
||||
time = perf_counter() - t0
|
||||
print('Total time:', f'{time:0.2f}s')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
# end::PRIMES_PROC_MAIN[]
|
||||
|
||||
Reference in New Issue
Block a user