How to add a line in file and print
Thanks for reponse. But I still don't see you are helping with my problem....
User Profile
Collapse
-
how to add user input to file and print
Here are my code below, i have two issues: 1) user input was overwritten. 2)i don't see the line is printed. What did i miss? please help.
------------------------------------------------
...Code:#!usr/local/bin/python3 f = open('python1/inputter.txt', 'w') while True: i = input("Write a sentence:") f.write(i) if i == "": break f = open('python1/inputter.txt',Last edited by zmbd; Sep 23 '12, 04:23 AM. Reason: Please use the format code <CODE/> button around your posted code. -
How to break a paragraph to sentences in python?
Hi, please help to hence me how to break a pargraph to print line by line if it ends with coma, it is a phras, if it ends with period , it is a sentence. Thank you soo much in advance.
Andrea
For example:
text = "It's probably a great morning for a doughnut run in New York City, since you won't have to fight off the NYPD. Officers are already positioned at 21 different retailers to keep their eyes...
No activity results to display
Show More
Leave a comment: