Python Code

C: