14 lines
280 B
Python
14 lines
280 B
Python
#!/usr/bin/python
|
|
# -*- encoding=utf-8 -*-
|
|
# author: Ian
|
|
# e-mail: stmayue@gmail.com
|
|
# description:
|
|
|
|
|
|
def list_to_dict(in_list):
|
|
return dict((i, in_list[i]) for i in range(0, len(in_list)))
|
|
|
|
|
|
def exchange_key_value(in_dict):
|
|
return dict((in_dict[i], i) for i in in_dict)
|