The pattern it uses it's deprecated, since the builtin syntax for the ternary operator has been introduced in PEP 308 on the release of Python 2.5.įurthermore s and +w+x for x in f(s) for w in('.','')] or įor x in f(s): #s removes first character
It mainly uses list comprehension and ternary operators implemented with binary operators