Python: printing a statement, and asking for an input on same line

I am trying to print a string, that asks for an input from a user. The user enters the input on the same line. It is in python, here is what i have

print("Enter Series", end="")         
sympy.var("n")         
self.series=self._sanatize_series(input())         
print("Enter Limits", end="")         
self.lim=input()     

Upvotes: 2

Views: 2225

Answers (1)

kyriakosSt
kyriakosSt

Reputation: 1772

input() function can take a string parameter to print before reading.

So what you need to do is

sympy.var("n")         
self.series=self._sanatize_series(input("Enter Series: "))                
self.lim=input("Enter Limits: ")   

Upvotes: 1

Related Questions