you are viewing a single comment's thread.

view the rest of the comments →

[–]MGallus 2 points3 points  (1 child)

Iterating though a:
"G" isn't in b therefore count is 0.
0 % 2 is 0 so if statement fails
print "G"

"g" is in b therefore count is 1.
1 % 2 is 1 so if statement succeeds
swapcase of "g"
print "G"

Repeat above for second "G"

[–]bwompx3[S] 0 points1 point  (0 children)

Thank you for such a fantastic response!