0
How to represent several characters as a single whole in Python?
Suppose T is a thief; $ is money ; G is a security guard. Any combinations and any amount of use of a particular symbol are possible if there is nothing between the money and the thief, then the money is in danger: print ('ALARM') In all other cases, everything is ok: print ('quiet') My code: https://code.sololearn.com/cNApjPi5omOH/?ref=app (there is a continuation of the description of the problem)
4 Respostas
+ 5
Мамазузу Равви ,
the conditional expression has to be like this:
...
if 'T#x27; in text or '$T' in text:
...
0
An interesting nuance. Thank
you
0
The discussion is declared closed