Traversing the string
for i in range ( len ( num ) ) : NEW_LINE INDENT if ( i % 2 == 0 ) : NEW_LINE INDENT sumOdd = sumOdd + int ( num [ i ] ) NEW_LINE DEDENT else : NEW_LINE INDENT sumEven = sumEven + int ( num [ i ] ) NEW_LINE DEDENT DEDENT print ( " Sum ▁ odd ▁ = ▁ " , sumOdd ) NEW_LINE print ( " Sum ▁ even ▁ = ▁ " , sumEven ) NEW_LINE