>>> n = -37 >>> bin(n) '-0b100101' >>> n.bit_length() 6
@dataclasses.dataclass
class Node:
value: int
left: Node
right: Node
from __future__ import annotations
i = 1
while cond(i):
do_something()
i +=1
for i in range(MAX):
if not cond(i):
break
do_something()
for i in itertools.count():
if not cond(i):
break
do_something()
count = 0
while cond():
count += 1
do_something()
merged_list = list1 + list2
merged_list.sort()