Seems simple, yet elusive, want to build a dict from input of [key,value] pairs separated by a space using just one Python statement. This is what I have so far:
This is what we ended up using:
n = 3 d = dict(raw_input().split() for _ in range(n)) print d
Input:
A1023 CRT A1029 Regulator A1030 Therm
Output:
{'A1023': 'CRT', 'A1029': 'Regulator', 'A1030': 'Therm'}