Fiserv Interview Question

Oops abd one python code that was easy