try:
lsts = [["key=fvv","val=34"],["key=djbjd","val=22"]]
result = {i[0].split("=")[1]: i[1].split("=")[1] for i in lsts}
print(result)
output
{'fvv': '34', 'djbjd': '22'}
solved Convert lists to dict python? [closed]
try:
lsts = [["key=fvv","val=34"],["key=djbjd","val=22"]]
result = {i[0].split("=")[1]: i[1].split("=")[1] for i in lsts}
print(result)
output
{'fvv': '34', 'djbjd': '22'}
solved Convert lists to dict python? [closed]