79709432

Date: 2025-07-21 17:27:12
Score: 0.5
Natty:
Report link
import os
for document in os.listdir('.'):
  if '.pdf' in document:
    print('Candidate:',document)
  if document[-3] == 'pdf':
    print('Found:',document)

Your if returns just one letter, so all the if block is ignored.

P.S. If it solves your problem, maybe click on "Best answer".

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: kaksi