from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"
from timeit import timeit
lst = [i for i in range(100)]
def good(num):
    return num >= 60
def with_for():
    ret = []
    for num in lst:
        if good(num):
            ret.append(num)
    return ret
def without_for():
    return [filter(good, lst)]
print(f"with:    {timeit(with_for, number=10000)}")
print(f"without:{timeit(without_for, number=10000)}"

哈哈哈哈