I want the input to be like
2 3 4 5
and not like
2
3
4
5
Is there any way to do it by adding end=''
or some other way in the input()
function?
This is part of a recursive function called makearray()
. I want it to take spaced inputs and not on new lines.
l = int(float(input("Enter number in array 1:"end='')))
if (l > 0):
global p
p = np.append(p, l * l)
else:
pass
makearray(b - 1)