You answeredJUST NOW
Python
STDIN
4
name:John
age:35
occupation:bar tender
kids:3
name:John
age:35
occupation:bar tender
kids:3
Expected STDOUT
{'name': 'John', 'age': '35', 'occupation': 'bar tender', 'kids': '3'}
Your STDOUT
{'name': 'John', 'age': '35', 'occupation': 'bar tender', 'kids': '3'}
STDIN
1
first_key:first_val
first_key:first_val
Expected STDOUT
{'first_key': 'first_val'}
Your STDOUT
{'first_key': 'first_val'}
STDIN
0
Expected STDOUT
{}
Your STDOUT
{}
STDIN
7
1:a
2:b
3:c
4:d
5:e
6:f
7:g
1:a
2:b
3:c
4:d
5:e
6:f
7:g
Expected STDOUT
{'1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g'}
Your STDOUT
{'1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g'}
Instructor solution
Collections in Python Presentation (pages 7, 8)
By Alec Kretch (Aug 6, 2023)
You may exit out of this review and return later without penalty.