I
I
InDust2020-08-19 12:09:40
Python
InDust, 2020-08-19 12:09:40

How to make a command system with multiple variables in python?

Hello, there is a certain code,

while True:
    command = input('[email protected]')


Next, with the help of operators, I determine the command entered,
if command == 'service':
    pass


In this code, there is a problem, you need to get two variables from one input at once, so that the command would look like this "service start',
So that 'service' would be entered into one variable, and 'start into another.
If something is not clear, write here I will try to answer quickly

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pikeev, 2020-08-19
@InDust

a, b = input('[email protected]').split(' ')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question