python code to calculate encryption time

Solutions on MaxInterview for python code to calculate encryption time by the best coders in the world

showing results for - "python code to calculate encryption time"
Sandeep
11 Jul 2019
1import timeit
2
3setup_code = "from math import factorial"
4
5statement = """
6    for i in range(10):
7        factorial(i)
8"""
9
10print(f"Execution time is: {timeit.timeit(setup = setup_code, stmt = statement, number = 10000000)}")