with open("test.txt") as f:
y = f.readlines()
z = input("Word : ")
a = z.split()
for count, line in enumerate(y):
if all(j in line for j in a):
print(count+1, line)
I organized it a little bit.
with open("test.txt") as f:
y = f.readlines()
z = input("Word : ")
a = z.split()
for count, line in enumerate(y):
if all(j in line.split() for j in a):
print(count+1, line, end="")
You might have intended this.
691 Error in x, y, and format string must not be None
609 Who developed the "avformat-59.dll" that comes with FFmpeg?
675 M2 Mac fails to install rbenv install 3.1.3 due to errors
1133 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
718 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2025 OneMinuteCode. All rights reserved.