>>> lst = [('7', '1'), ('5', '2'), ('8', '3'), ('4', '4')]
>>> [a == b for a, b in lst]
[False, False, False, True]
>>>
>>> (1).__format__
<built-in method __format__ of int object at 0x4cba34a0>
>>>
>>> class Int(int):
... def __format__(self, spec):
... if spec.startswith('x'):
... return str(self) * int(spec[1:])
... return super().__format__(spec)
...
>>> n = Int(10)
>>> '{:05d} {:x5}'.format(n, n)
'00010 1010101010'
>>>