How to make so that the carriage is not moved to the new string in ternary operator?

Wrote the bad code(specifically) in Python, everything is fine, but I need for the ternary operator else " NOT translating the carriage to a new line,just nothing happened))
[[print(exit(0) if 100 < int(i) else i if int(i) >= 10 else ") for i in [input()]] for _ in range(1000)]


The program displays all the numbers no longer less than 10, and exits if you enter a number greater than 100
I apologize in advance for this code, just eksperementiruyu))
April 3rd 20 at 18:46
2 answers
April 3rd 20 at 18:48
Solution
[[print(exit(0) if int(i) > 100 else i if int(i) >= 10 else ", end=(exit(0) if int(i) > 100 else '\n' if int(i) >= 10 else ")) for i in [input()]] for _ in range(1000)]
not after each administration the numbers only work when else " condition - ola commented on April 3rd 20 at 18:51
@ola, You are definitely in one line? - Adelle.Frami32 commented on April 3rd 20 at 18:54
@Adelle.Frami32, it is necessary that the carriage just crossed a new line if you enter a number less than 10, the else condition is " pulling the cart below and the result is a gap between figures displayed in the console, it needs to be deleted.Yeah, that was the goal, in two lines, no problem. - ola commented on April 3rd 20 at 18:57
@ola, updated the answer. - Adelle.Frami32 commented on April 3rd 20 at 19:00
@Adelle.Frami32nice - ola commented on April 3rd 20 at 19:03
April 3rd 20 at 18:50
Ruslan helped you of course, but generally when trying to refactor after these programmers, we feel an irresistible desire to shake his neck for such a code.
it's pure fun, as already mentioned in the header of the question - ola commented on April 3rd 20 at 18:53

Find more questions by tags Python