I am a little confused I want to check how many times a value has repeated in a list of days. For example I have a dictionary
dict = {
"01" : 0,
"02" : 0,
"03" : 0,
"04" : 0,
"05" : 0,
"06" : 0,
"07" : 0,
}
I have a list of values = ['02','01','02','03','07','05']
and I want to print result like this:
{"Monday": 1,"Tuesday": 2,"Wednesday": 1, "Thursday": 0, "Friday": 1, "Saturday": 0 ,"Sunday": 1}
Here is the code that I am testing
for i in range(len(value_list)):
for j in day:
print(j)
for i in range(len(value_list)):
print(day.key)
# count = value_list.count(list(day)[i])
if value_list[i] == (day):
print("i: ", value_list[i])