fork download
  1. from string import ascii_uppercase
  2. upper = ascii_uppercase
  3. s = 'TTteSTStrForAnon'
  4.  
  5. for i in upper:
  6. s = s.replace(i, '🐍' + i + '🐍')
  7. print(s.strip('🐍').replace('🐍🐍', '🐍').split('🐍'))
Success #stdin #stdout 0.03s 10344KB
stdin
Standard input is empty
stdout
['T', 'T', 'te', 'S', 'T', 'S', 'tr', 'F', 'or', 'A', 'non']