79108028

Date: 2024-10-20 20:48:21
Score: 0.5
Natty:
Report link

If you don't want to introduce additional list to the filter result, Use next() to get the object in the filter

fileList = next(filter(lambda x: '.mhd' in x, fileList))

This would return the next object in iter or None/[] based on the type of fileList.

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