Python - Sample Interview Question (Junior Level)

What will be the output of the following code?

contacts = {'David': 100, 'Rami': 200, 'Yoni': 300, 'Lyn': 400}
del contacts[100]
del contacts['Rami']
print contacts.keys()

  1. ['Lyn', 'Yoni', 'David']
  2. ['Lyn', 'Yoni', 'Rami', 'David']
  3. Compilation Error
  4. An Exception will be thrown
Tests in Python for Juniors

Test Name Difficulty Time (minutes) No. of Questions
Python Online Test for Juniors Python Junior 60 30

More Specific Tests in Python for Juniors

Test Name Difficulty Time (Minutes) No. of Questions
Python-Data-Structures Online Test for Juniors Python - Data Structures Junior 20 10
Python-File-I/O Online Test for Juniors Python - File I/O Junior 20 10
Python-Basics Online Test for Juniors Python - Basics Junior 20 10