Introduction
In this lab, you will learn how to check if a Python dictionary has a specific number of keys. This involves exploring dictionary size using the built-in len()
function to determine the number of key-value pairs.
You'll create a Python script to define a dictionary, use len()
to get its size, and print the result. You'll also experiment with an empty dictionary to observe the output. This hands-on experience will demonstrate how to effectively use len()
to verify the key count in dictionaries.