+ 1

How can I erase an input text on python?

I mean, if an input is, for example, "input: clear", how can I delete the text?

18th Mar 2020, 12:13 PM
David
David - avatar
15 Answers
+ 2
Don't write any words between double quotes for input function Like this code i didn't write any words as i t will appear before answer 👇👇 https://code.sololearn.com/c6bZ5DYw8EOY/?ref=app
18th Mar 2020, 12:32 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 2
This sentence explain to user what should be entered Impossible to clear it In this App if u write or not any sentence it will not be showed before the user enter any thing VS any IDE like pycharm or Visual or any program It will be showed before the user enter any thing as this sentence will explain what the user will enter David Martínez Castañón
18th Mar 2020, 1:45 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
You want to delete it from anywhere
18th Mar 2020, 12:37 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
Can you explain more by example
18th Mar 2020, 12:38 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
If you write anything between the double quotes for input function, it will be exposed on the screen before it receives any value from the user, and this is best for the user to know what must be entered, but if you do not write anything the user will not know what must be entered and consequently, an error can occur in the outputs But if you want to delete the sentence that was written, it is not possible, but you can display an explanatory sentence between the parentheses of the print function and through it the user knows what can be entered David Martínez Castañón
18th Mar 2020, 2:25 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
18th Mar 2020, 2:30 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
WhyFry Thanks very much. Will try that now. But I think it's similar to what have been trying. Check my previous code here. https://code.sololearn.com/cq88VtvHCJmH/?ref=app
19th Mar 2020, 6:51 AM
Kareem Basit Adeniyi
Kareem Basit Adeniyi - avatar
+ 1
YouTube Video for how to erase input text on Python 4:50 08-Jul-2015 · Learn how to Clear a text field by ID using Python ...
19th Mar 2020, 7:29 AM
narayanaprasad
narayanaprasad - avatar
0
I know, but I want to have an input text that is erased after the user input
18th Mar 2020, 12:34 PM
David
David - avatar
0
https://code.sololearn.com/c847BYs5NHvL/?ref=app Something like that but erasing "Press c to print something" after pressing c
18th Mar 2020, 12:47 PM
David
David - avatar
0
Im not doing the program with sololearn app so that is not a problem. Just used it for the example.
18th Mar 2020, 2:10 PM
David
David - avatar
0
Ok, thanks
18th Mar 2020, 2:29 PM
David
David - avatar
0
Good day coders!!! I want to write a code that will contain the following steps. 1. User will define number of inputs in a line, say 7 2. The programme will then prompt the user to start entering their inputs for the given number e.g Input () Input () Input() Input() Input () Input() Input() Thanks, have it in mind that the number of inputs to be prompted will be supplied by the user not the coder. Have tried using a for loop but it's telling me EOFError
19th Mar 2020, 6:34 AM
Kareem Basit Adeniyi
Kareem Basit Adeniyi - avatar