Python Forum
Looping through a dictionary for every other value
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looping through a dictionary for every other value
#12
That's right, letlist is computed properly and you can print it. But you need to return it from the function. Otherwise this:
my_dict = dictfunc()
doesn't make much sense. What are you assigning to my_dict?
At least that is what causes the error I get by running your code. What error do you get?
Reply


Messages In This Thread
RE: Looping through a dictionary for every other value - by j.crater - Jan-25-2018, 06:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Looping to Create Nested Dictionary gngu2691 10 33,803 Jun-22-2018, 04:11 PM
Last Post: anickone

Forum Jump:

User Panel Messages

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