human
Sum of numbers formed by consecutive digits present in a given string | Function to calculate the sum of numbers formed by consecutive sequences of digits present in the string.
Stores consecutive digits present in the string.
Stores the sum.
Iterate over characters of the input string.
If current character is a digit.
Append current digit to curr.
Add curr to sum.
Reset curr.
Driver Code"
How can the above be solved in Python?

=====
Can you provide a code to sum of numbers formed by consecutive digits present in a given string and the other steps required?
assistant
#Here is code to sum of numbers formed by consecutive digits present in a given string and the other steps required.
 def sumOfDigits ( s ) :
	curr = 0
	ret = 0
	for ch in s :
		if ( ord ( ch ) >= 48 and ord ( ch ) <= 57 ) :
			curr = curr * 10 + ord ( ch ) - ord ( '0' )
		else :
			ret += curr
			curr = 0
	ret += curr
	return ret
S = "11aa32bbb5"
print ( sumOfDigits ( S ) )