while True:
x = range(3)
import time
while True:
x = range(3)
time.sleep(0.1)
arr = [1, 2, 3]
arr = [2*i for i in arr]
print(arr)
D = [['Параметр', 'a', 'a', 'a', 'b', 'b', 'b'],
['От', '1', '11', '51', '1', '31', '45'],
['До', '10', '50', '99', '30', '44', '60'],
['00', '01', '02', '03', '04', '05', '06']]
zipped_D = list(zip(*D))[1:]
fltr_1 = lambda lst: lst[0] == 'b'
fltr_2 = lambda lst: int(lst[1]) <= 40 <= int(lst[2])
result = [
item[3]
for item in zipped_D
if fltr_1(item) and fltr_2(item)
]
print("Искомое:", *result)
def func():
counter = 0
while True:
for elem in range(3):
# do something
counter += 1
yield counter
current_func = func()
for i in range(5):
print(next(current_func))