Python Forum
counting with dictionaries
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
counting with dictionaries
#3
Also, if someone does give a file to process, nothing gets processed. Use the if/else just to get the file name, then do the processing after the if/else, not as part of the else clause. When you do print(f.read()), there is nothing left to read. So content=f.read() gets nothing. And item on line 17 needs to be items.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
counting with dictionaries - by gitiya - Sep-07-2018, 08:11 AM
RE: counting with dictionaries - by buran - Sep-07-2018, 08:19 AM
RE: counting with dictionaries - by ichabod801 - Sep-07-2018, 01:04 PM
RE: counting with dictionaries - by gitiya - Sep-07-2018, 01:25 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020