Answers for "python dictionary of string to string list"

C#
0

python convert string to list of dictionaries

import json

with open('.listOfDicts.txt', 'r') as file:
    dataList = json.loads(file.read().replace('n', ''))

for dictItem in dataList:
    for key , val in dictItem.items():
        print( key , val )
Posted by: Guest on May-05-2020
0

convert list of string to dictionary

var res = list.ToDictionary(x => x, x => x);
Posted by: Guest on September-19-2021

Code answers related to "python dictionary of string to string list"

C# Answers by Framework

Browse Popular Code Answers by Language