Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {'definition': 'dirname',
- 'get': ['getatime', 'getctime', 'getmtime', 'getsize'],
- 'operation': ['join',
- {'split':['split', 'splitdrive', 'splitext']},
- {'expand': ['expanduser', 'expandvars']},
- ],
- }
- lst = []
- def count_d(dt):
- global lst
- if isinstance(dt, dict):
- for value in dt.values():
- if isinstance(value, str):
- lst.append(value)
- else:
- count_d(value)
- elif isinstance(dt,list):
- for ele in dt:
- if isinstance(ele, str):
- lst.append(ele)
- else:
- count_d(ele)
- return lst
- lst = []
- def count_d(dt):
- global lst
- for ele in dt:
- if isinstance(ele,str):
- lst.append(ele)
Add Comment
Please, Sign In to add comment