Ad
  • Default User Avatar

    Your code always returns value after first iteration. You can easily see that if you add one print().