fork download
  1. # your code goes here
  2. text = 'COLLECTION_DELINQUENCY_CONTROL_ACH_RETURN,COLLECTION_DELINQUENCY_CONTROL_CARD_RETURN'
  3.  
  4. # Splits at space
  5. print(text.split(','))
  6.  
  7. word = 'geeks, for, geeks'
  8.  
  9. # Splits at ','
  10. print(word.split(', '))
  11.  
  12. word = 'geeks:for:geeks'
  13.  
  14. # Splitting at ':'
  15. print(word.split(':'))
  16.  
  17. word = 'CatBatSatFatOr'
  18.  
  19. # Splitting at 3
  20. print([word[i:i+3] for i in range(0, len(word), 3)])
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
['COLLECTION_DELINQUENCY_CONTROL_ACH_RETURN', 'COLLECTION_DELINQUENCY_CONTROL_CARD_RETURN']
['geeks', 'for', 'geeks']
['geeks', 'for', 'geeks']
['Cat', 'Bat', 'Sat', 'Fat', 'Or']