convert string to dictionary
# Python3 code to convert a
# string to a dictionary if
# string is not in dictionary form
# Initializing String
string = "A - 13, B - 14, C - 15"
# Converting string to dictionary
Dict = dict((x.strip(), y.strip()) for x, y in (element.split('-') for element in string.split(', ')))
print(Dict)
print(Dict['A'])
print(Dict['C'])