Python Forum
hardest week yet: some guidence please
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hardest week yet: some guidence please
#25
Not meaning to obfuscate, just a reminder that in the Homework forum that goal is to lead you to the answer rather than give you the answer. An "A Ha!" moment is much better for the learning process.
OK, in more detail. In line 16 he is looping through intruder_log, but by using
for key in intruder_log
he is only getting the first value, where he really needs both (the name and the count) so
for name, count in intruder_log:
will pull both values. NOW you can print the results using the format method
Reply


Messages In This Thread
RE: hardest week yet: some guidence please - by jefsummers - Aug-22-2019, 02:50 PM
slice help - by raymond2688 - Aug-17-2019, 12:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculating the number of day of the week RbaPhoenix 3 2,570 Mar-27-2020, 09:23 PM
Last Post: Larz60+
  week 1 python help - string formatting ? raymond2688 20 8,066 Jul-09-2019, 08:10 PM
Last Post: snippsat
  Trying to get the week number from a string of numbers fad3r 2 3,279 Apr-15-2018, 06:52 PM
Last Post: ljmetzger

Forum Jump:

User Panel Messages

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