i just want to compare a string with a list of string
if the pattern of letters matching to the list, the i want a simple true as output
see my example below:
a = ["jackpot","guru","otto","name"]
s = "tttguruugfhghd"
if s contain in a:
print("hit")
else:
print("no hit")
output should be:
hit (in this case)
i think there is a easy solution, but i didn't find anything yet
ok, now this is working, but now i have a new question:
a = ["jackpot","guru","otto","name"]
s = "guruu"
if s in a:
print("hit")
else:
print("no hit")
if i run this code i get a no hit but i want a hit even if "s" the string is not 100% matching but i contains the pattern