Python Interview Questions
  • Python - Dictionary
    1. Consider the following dictionary:{ "The Bodyguard":"1992", "Saturday Night Fever":"1977"} select the values?
    A) "1997"
    B) "1992"
    C) "The Bodyguard"

    Answer: "1997" & "1992"
    2.The variable release_year_dict is a Python Dictionary, what is the result of applying the following method: release_year_dict.values()
    A) retrieves the keys of the dictionary
    B) retrieves the values of the dictionary

    Answer: retrieves the keys of the dictionary
    3. What is wrong with the following dictionary: {'a':1, 'a':2}
    A) it has duplicate entries for the keys
    B) it has different entries for the values

    Answer: it has duplicate entries for the keys
    4. What python object do you cast to a dataframe?
    A) Tuple
    B) Set
    C) Dictionary
    D) Lists

    Answer: Dictionary

  • Apply for an intership with Datai Analytics by filling your email, name and phone number