Performance Generator for-loop and yield

Run Settings
LanguagePython
Language Version
Run Command
from time import time def performence(func): def wrapper(*args, **kwargs): s_time = time() func(*args, **kwargs) e_time = time() print(f"Time required is: {e_time - s_time}") return wrapper() @performence def loop1(): for i in range(10000000): i*5 @performence def loop2(): for i in range(10000000): yield i*5
Editor Settings
Theme
Key bindings
Full width
Lines