-->
当前位置:首页 > 题库

PROGRAMMING:Building a dictionary from two lists

Luz5年前 (2021-05-10)题库417
Enter two lines of string, separated by spaces, and store each line of string as a list. Take the element value of the first list as the key, and the elements in the second list in the corresponding order as the value to build a dictionary. After the key is arranged in ascending order, the list of all key value pairs in the dictionary will be output.
###Input format:
Enter two lines of string separated by spaces to save as a list.
###Output format:
Key ascending order, output dictionary key value pair list.
###Input example:
```in
School city zip code
Jimei University Xiamen 361021
```
###Output example:
```out
[('city ',' Xiamen '), ('School', 'Jimei University'), ('postcode ',' 361021 ')]
```







answer:If there is no answer, please comment