разделить строку и преобразовать в Int Python

a, b = tuple(int(x) for x in '1 2'.split())
Stranger danger