Oct-06-2019, 07:12 PM
(Oct-02-2019, 10:20 AM)buran Wrote: Yes, you are usingand
wrong
Look at https://docs.python.org/3/library/stdtyp...ue-testing
'A' and 'B' and 'C' in x
is same asTrue and True and 'C' in x
def check(iterable): sequences = ('ABC', 'ADG', 'AEI', 'IHG', 'IFC', 'DEF', 'BEH') return any(all(char in iterable for char in seq) for seq in sequences)
Oh I see. Thank you. So would it work if instead of A and B and C in x I write A in x and B in x and C in x?