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)

16th May 2021, 11:28 AM
Мамазузу Равви
Мамазузу Равви - avatar
3 ответов
+ 5
Мамазузу Равви , the conditional expression has to be like this: ... if 'T
#x27; in text or '$T' in text: ...
16th May 2021, 12:24 PM
Lothar
Lothar - avatar
0
An interesting nuance. Thank you
17th May 2021, 5:09 AM
Мамазузу Равви
Мамазузу Равви - avatar
0
The discussion is declared closed
17th May 2021, 5:10 AM
Мамазузу Равви
Мамазузу Равви - avatar