Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wifi_parm: &wifi_params
- ssid: 1
- key: 2
- test1:
- name: connectivity
- <<: *wifi_params
- test2:
- name: connectivity_5ghz
- <<: *wifi_params
- import yaml
- import pprint
- with open(r'C:UsersayaskolkPycharmProjectsuntitled1aaa.yaml', "r") as f:
- result = yaml.load(f)
- pprint.pprint(result)
- {'test1': {'key': 2, 'name': 'connectivity', 'ssid': 1},
- 'test2': {'key': 2, 'name': 'connectivity_5ghz', 'ssid': 1},
- 'wifi_parm': {'key': 2, 'ssid': 1}}
- {'test1': {'key': 2, 'name': 'connectivity', 'ssid': 1},
- 'test2': {'key': 2, 'name': 'connectivity_5ghz', 'ssid': 1}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement