Posts by LCalado • 11 points
1 post
-
-3
votes1
answer71
viewsQ: Sum values of a string by assigning values to letters (Python)
Goal: Assign values to a string based on a dictionary with keys and values Example: I have a string in this format: str = 'ABCD' and a dictionary in this. dic = {'A' : 71, 'B' : 103, 'C' : 115, 'D'…