How do i convert all the variables into an int straightaway

32 Views Asked by At

a,b,c = input(a,b,c).split()

would need a way to immediately convert a,b,c into int without having to do something like

a = int(a) b = int(b) c = int(c)

please help :)

1

There are 1 best solutions below

0
hedy On
l = input().split(',')
l = [ int(i) for i in l ]
a, b, c = *l

Run the code and enter 3 integers separated by ',' then a b and c will contain the 3 integers