Merge branch 'master' of https://github.com/kenwoodjw/python_interview_question
commit
c7a9c0dc4c
|
@ -352,8 +352,8 @@
|
||||||
def str2dict(str1):
|
def str2dict(str1):
|
||||||
dict1 = {}
|
dict1 = {}
|
||||||
for iterms in str1.split('|'):
|
for iterms in str1.split('|'):
|
||||||
key,value = iterms.split(':'):
|
key,value = iterms.split(':')
|
||||||
dict1[key] = value
|
dict1[key] = value
|
||||||
return dict1
|
return dict1
|
||||||
```
|
```
|
||||||
## 3.5 请按alist中元素的age由大到小排序
|
## 3.5 请按alist中元素的age由大到小排序
|
||||||
|
|
Loading…
Reference in New Issue