i have a dictionary like this : (i,m using Python 3.9)
myDict = {'hamid': 25,
'john' : 15,
'mike': 14.666666666666666
'tim': 16.6
'joana': 13.666666666666666
'hana': 10.666666666666666
}
the values in the dictionary must be integer
i wanna write each item in a row of a csv file named Results.csv and must be exactly like this : (each key and it's value in a single line of the csv file )
hamid,25
john,15
mike,14.666666666666666
tim,16.6
joana,13.666666666666666
hana,10.666666666666666
and for the second issue :
how can i write 3 of them which have higher values ( descending 3 of them ) like this :
hamid,25
john,15
tim,16.6
or Ascending 3 of them like this :
mike,14.666666666666666
joana,13.666666666666666
hana,10.666666666666666
THE VALUES SHOULDN,T BE ROUNDED
thanks