Quiz · 3 questions
📦 Data — The Four Collections (and friends)
list / tuple / dict / set + bytes
Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete
Quiz
01Which of these returns
None instead of a sorted list?Hint
There's a Python convention: in-place operations don't return the object.
02What is
b"abc"[0] in Python 3?Hint
Slicing returns the same type, but indexing one element of bytes is special.
03Why is
dict.fromkeys(items) often the modern way to dedup a list while preserving order?Hint
Set dedups but loses order. Dict... preserves what?
Comments 0
🔔 Reply notifications (sign in)Sign in — Please sign in to comment.
No comments yet — be the first.