A
A
afkalipt2018-08-03 20:36:04
Python
afkalipt, 2018-08-03 20:36:04

How to enter two different variables separated by a space in python?

Enter two numbers separated by a space. It is necessary that the first goes into one variable, and the second goes into another variable.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
0
0xD34F, 2018-08-03
@afkalipt

a, b = input().split()

S
Sergey Gornostaev, 2018-08-03
@sergey-gornostaev

a, b = (int(i) for i in input().split())

K
KhD, 2018-08-04
@KhD

a, b = map(int, input().split())

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question