After receiving the data in the word variable in the following code, enter the character "Q" and exit You are about to print out the data you received. If I run this code, it will output up to Q, so how do I code it to print it out without Q?
You can do it as below.
word=input() while(word!="Q") infile.write(word+"\n") word=input()
If you don't write when you enter "Q", you can do it in another way.
1078 In Java servlet, when SHA-256 sends WW-Authenticate header for digest authentication, the client does not return the result.
640 Scrap text information after the "View More" button when searching in the Yahoo! News search window
1281 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
748 I'm a beginner at Flask. The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
783 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2025 OneMinuteCode. All rights reserved.