User Profile

Collapse

Profile Sidebar

Collapse
newbieinpython
newbieinpython
Last Activity: Mar 28 '13, 04:14 AM
Joined: Sep 21 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to add a line in file and print



    Thanks for reponse. But I still don't see you are helping with my problem....
    See more | Go to post

    Leave a comment:


  • newbieinpython
    started a topic how to add user input to file and print

    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',
    ...
    See more | Go to post
    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...
    See more | Go to post
No activity results to display
Show More
Working...