79657305

Date: 2025-06-07 20:39:10
Score: 1
Natty:
Report link

In your case, when previous value is empty, previous in 'dD' returns true.

So in your code, from the first part, it return flag_di=True

As a result the output is 1.

How to fix?

You can add add some code part that check previous is empty or not.

if previous and car in 'iI' and previous in 'dD':  # Check if previous is not empty
    flag_di = True

Then answer will be 0

Reasons:
  • Whitelisted phrase (-1): In your case
  • RegEx Blacklisted phrase (1.5): How to fix?
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Hiroshi Ashikaga