writing Program that print the number of newlines,words and characters in counted fil

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ebook25
    New Member
    • Sep 2013
    • 1

    writing Program that print the number of newlines,words and characters in counted fil

    What i'm trying to do is writing Program that print the number of newlines,words and characters in counted file by python

    I'm lost and i do not how should i do it?

    that what i got so far

    Code:
    infilename = input("Enter the name of the file:")
    
    infile = open ( infilename ,'r')
    
    for line in infile:
        line = line.split()
    Last edited by Rabbit; Sep 26 '13, 03:43 AM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
  • ryno du preez
    New Member
    • Jul 2011
    • 91

    #2
    Hi are you looking for something specific in the file or just how many caretakers is in the file?

    Comment

    Working...