1 | input = ['Duration', 'F0', 'F1', 'F2', 'F3'] |
如何写出来?
字典推导式
1 | {f:i for f, i in zip(input, range(len(input)))} |
其他
1 |
|
字符串翻转的办法
1 | def reverse_string3(s): |
曾因酒醉鞭名马 生怕情多累美人
1 | input = ['Duration', 'F0', 'F1', 'F2', 'F3'] |
如何写出来?
字典推导式
1 | {f:i for f, i in zip(input, range(len(input)))} |
其他
1 |
|
字符串翻转的办法
1 | def reverse_string3(s): |