I tried to use the last part of the code but it doesn't work it just says false there might be some errors and if your wondering i have a txt file with names
import string
string.ascii_letters
'abcdefghijklmnOpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
import random
letter = random.choice(string.ascii_letters)
print(letter)
file = open("names.txt")
found = [] #Result will Store
for m in file:
if m.startswith(letter): #It will check if the input value match with from begining of the signl world
found.append(m) # Store the value if match
for f in found:
print("\n"+f)
print("Total Words is "+str((len(found))))
rika = input("name: ")
print(rika in found)