Is there a logical operator in python for and/or of strings?
I am trying to write a weasel code. What I have so far:
import random
import math
keys='abcdefghijklmnopqrstuvwxyz '
monkey='methinks it is like a weasel'
def attempt():
attempt=''
for i in range(len(monkey)):
x=random.choice(keys)
attempt+=x
return(attempt)
library_attempts=[]
for i in range(100):
library_attempts.append(attempt())
matches=[]
for i in library_attempts:
if i[0]=="m" | i[1]=="e" or i[2]=="t" or i[3]=="h" or i[4]=="i" or i[5]=="n" or i[6]=="k" or i[7]=="s" or i[8]==" " or i[9]=="i" or i[10]=="t"\
or i[11]==" " or i[12]=="i" or i[13]=="s" or i[14]==" " or i[15]=="l" or i[16]=="i"\
or i[17]=="k" or i[18]=="e" or i[19]==" " or i[20]=="a" or i[21]==" " or i[22]=="w"\
or i[23]=="e" or i[24]=="a" or i[25]=="s" or i[26]=="e" or i[27]=="l":
matches.append(i)
print len(matches)
I want the or in my code to mean and/or, but I don't know how to do that. Any help would be greatly appreciated!