fork download
  1. test_string = 'TTteSTStrForAnon'
  2.  
  3. def mega_splitter(input_string):
  4. upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  5. s = input_string
  6. for i in upper:
  7. s = s.replace(i, '🐍' + i + '🐍')
  8. return s.strip('🐍').replace('🐍🐍', '🐍').split('🐍')
  9.  
  10.  
  11. print(mega_splitter(test_string))
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
['T', 'T', 'te', 'S', 'T', 'S', 'tr', 'F', 'or', 'A', 'non']