PY
py
1
2
3
4
5
6
7
8
9
10
11
import re
#a=str(input())
a="xxxxxGxxTxGx$x$xxGxxTxxTx"
p1=r"[T][^G]*[$]"
p2=r"[$][^G]*[T]"
m1=re.search(p1,a)
m2=re.search(p2,a)
if m1 or m2:
print ("ALARM")
else:
print ("quiet")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run