If i run your code i don't get
file used: cofig.yaml
week: [[12, 13]]
.import yaml with open("config.yaml", encoding='utf8') as f: cfg = yaml.load(f, Loader=yaml.FullLoader)Test.
>>> cfg {'name': 'John Doe', 'username': 'jd9003', 'week': [12, 13], 'worksheet_name': 'March 2024'} >>> cfg['week'] [12, 13] >>> cfg['week'][1] 13 >>> type(cfg['week'][1]) <class 'int'>So get back Python data structure a dictionary contains a working list of integers.
file used: cofig.yaml
Output:{'worksheet_name': 'March 2024',
'week': [12, 13],
'name': 'John Doe',
'username': 'jd9003'}