I made this to test it for another script.
I have this code that checks if a specific value in users.txt I added it (let's say 21) exists the check function value 21 if it's, then it prints the existing value
But no result with it, where is the problem?
listNum = list(range(1, 101))
def check(z):
with open('users.txt') as f:
for i in range(len(listNum)):
if str(i) in f.read():
result = print(str(listNum[i]))
return result
check(21)
print()returnsNone, soresultisNonein any case.21, The output must be the value that is in the example file