ch20 cleanup and f-strings
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from time import perf_counter
|
||||
from typing import List, NamedTuple
|
||||
from threading import Thread
|
||||
from queue import SimpleQueue
|
||||
from time import perf_counter
|
||||
from threading import Thread
|
||||
from typing import List, NamedTuple
|
||||
|
||||
from primes import is_prime, NUMBERS
|
||||
|
||||
@@ -32,8 +32,8 @@ 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')
|
||||
elapsed = perf_counter() - t0
|
||||
print(f'Total time: {elapsed:.2f}s')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user