0

How i can call a function twice in same line?

I wanna get two inputs in 1 line with space.for example: while True: row,column=func(int(input)),func(int(input))

18th Mar 2018, 2:12 PM
mohamadjavad
mohamadjavad - avatar
2 ответов
+ 1
First of all, Thats not recommended, just get one input. then use the .split function. and run a loop on the string. Second of all, Your code makes no sense. What are you trying to do?. please be more specific next time.
18th Mar 2018, 3:07 PM
Tomer Sim
Tomer Sim - avatar
+ 1
First off, you need parentheses after 'input', like so 'input()' Secondly, what you could do is: row, column = input('Enter row: '), input('Enter column: ') Or, you could get both from the same input using the '.split()' function: x = input('Enter row and column: ').split() row, column = x[0], x[1] This way, you could get both values through the same input, separated by a space.
18th Mar 2018, 5:56 PM
Just A Rather Ridiculously Long Username