Python Forum
Finding average in dictionary using for loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding average in dictionary using for loop
#2
You could check this out: https://www.w3schools.com/python/python_...naries.asp

for value  in thisdict.values():
  print(value) 

for key, value in thisdict.items():
  print(key, value) 
Reply


Messages In This Thread
RE: Finding average in dictionary using for loop - by michalmonday - May-24-2019, 03:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Loop through elements of list and include as value in the dictionary Rupini 3 2,695 Jun-13-2020, 05:43 AM
Last Post: buran
  Finding the average of numbers in a txt file piday 1 19,263 Feb-27-2018, 04:00 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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