• Python question of the day

    What would be the output of executing the following code:
    call_codes = {"France":33, "Brazil": 55, "UK": 44}
    sorted(call_codes)
     ['Brazil', 55, 'France', 33, 'UK', 44]
     ['France', 33, 'UK', 44, 'Brazil', 55]
     [33, 44, 55]
     ['Brazil', 'France', 'UK']
    Explanation:
    In python, sorted method sorts keys of a dictionary, not values.


    Top 100 python interview questions:






datai analytics