By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,728 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,728 IT Pros & Developers. It's quick & easy.

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

P: 1
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

Expand|Select|Wrap|Line Numbers
  1. infilename = input("Enter the name of the file:")
  2.  
  3. infile = open ( infilename ,'r')
  4.  
  5. for line in infile:
  6.     line = line.split()
Sep 26 '13 #1
Share this Question
Share on Google+
1 Reply

ryno du preez
P: 91
Hi are you looking for something specific in the file or just how many caretakers is in the file?
Oct 2 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.