For each value below, print the value and its type.
Hint: loop over the list and use type().
Convert the tuple below to a list, append one more city, and print both the list and its type.
Hint: use list() and .append().
Remove duplicates from this list of tags and print the unique tags.
Hint: convert list to set, then back to list if you want.
Create a dictionary from these key/value pairs and print the dictionary.
Hint: use dict() on the list of tuples.
Loop through the values and print whether each value is an int, float, string, or other.
Hint: use isinstance() with if/elif.
Compute the sum of numeric values only from the list below.
Hint: keep only values that are int or float using isinstance(v, (int, float)).
Update this dictionary by changing age, adding university, then print keys, values, and all key/value pairs.
Hint: use assignment or .update(), then .keys(), .values(), and .items().
Practice set methods: add one item, remove one item, safely discard one missing item, then print the set.
Hint: use .add(), .remove(), and .discard().
Create an integer array from the numbers below, convert it to a list with .tolist(), and print both types.
Hint: use from array import array and array("i", ...).
Mini challenge: from the list below, build a dictionary counting how many values belong to each type (int, float, str, other).
Hint: use a dictionary as counters and isinstance() inside a loop.
Chapter Navigation
Move between chapters.