Welcome! Here you can paste sources and general debugging text, You can even set yourself a password if you want to keep it just for yourself.

Posted by pythoner on March Tue 7th 5:12 PM - Never Expires
Download | New paste

  1. #!/usr/bin/python
  2. import sys
  3. def my_split(s, seps):
  4.     res = [s]
  5.     for sep in seps:
  6.         s, res = res, []
  7.         for seq in s:
  8.             res += seq.split(sep)
  9.     return res
  10.  
  11. print my_split("alo per, serl! irurnd= pppp", [' ', ';', ',', '.', '!', '?', ':', '"', '(', ')', '<', '>', '[', ']', '#', '$', '=', '-', '/'])
Language:
To highlight particular lines, prefix each line with @@





Hosted by KanGouLya for OpenTunisia
Donate for OpenTunisia Servers.
Powered by PHPaste 1.1