79443090

Date: 2025-02-16 11:58:39
Score: 1
Natty:
Report link

I don't know if I understood your problem very well. But have you ever tried to read the string file and transform it into a lower without using a library?

Like this

open("file.txt", "w").write(content) if (content := open("file.txt").read().lower()) else None

And if you have more files you can just add for loop

Like this

[ open(file, "w").write(content) if (content := open(file).read().lower()) else None for file in ["file1.txt", "file2.txt"] ]

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: ManohisoaS