s
city = ['t', 'bb', 'cd', 'sdf', 'adf', 'aa']
for i in range(len(city)):
if city[i] in ('a', 'b'):
print(city[i])
Size: a a a
s
city = ['t', 'bb', 'cd', 'sdf', 'adf', 'aa']
for i in range(len(city)):
if city[i] in ('a', 'b'):
print(city[i])
ВЛ
In [13]: bool(re.search('st|mo', 'state'))
Out[13]: True
s
ВЛ
city = ['t', 'bb', 'cd', 'sdf', 'adf', 'aa']
for i in range(len(city)):
if bool(re.search('d|a', city[i])):
print(city[i])
s
city = ['t', 'bb', 'cd', 'sdf', 'adf', 'aa']
for i in range(len(city)):
if city[i] in ('a', 'b'):
print(city[i])
ВЛ
А
city = ['t', 'bb', 'cd', 'sdf', 'adf', 'aa']
for i in range(len(city)):
if bool(re.search('d|a', city[i])):
print(city[i])
ВЛ
s
ВЛ
К
AS
In [17]: positives
Out[17]: ['st', 'mo']
In [18]: for c in city:
...: if any (pos in c for pos in positives):
...: print(c)
...:
st
mo
mo
In [19]: city
Out[19]: ['st', 'mo', 'lol', 'rofl', 'mo']
AS
{repair_type: money}
russian_repair = {'Косметика': 2950, 'Капиталка': 4950, 'Под ключ': 5450}if 'русский-ремонт.рф' in df['domain'][1]: