0

Assume the following code sample

fullstring = """Diamond Ring
+50 to Strength 
+28% to Resistance
some extra text"""


if fullstring.find('% to Resistance') != -1:
    print("Found!")
    # isolate value to the left of %
    # store value

I want to extract the following value from my string

28

and store them

0 Answers0