Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

dict map()

List = [H4, C9, S4, D2]
Dictionary  = {key: int(value) for key, value in List}

# Output:
# {'H': 4, 'C': 9, 'S': 4, 'D': 2}
 
PREVIOUS NEXT
Tagged: #dict
ADD COMMENT
Topic
Name
8+4 =