[ create a new paste ] login | about

Link: http://codepad.org/ABuodKwx    [ raw code | output | fork ]

Python, pasted on Feb 24:
1
2
3
4
5
6
7
8
9
10
11
import re

def remove(s, t):
    return "".join([ ch for ch in s if ch not in t ])

def remove2(s, t):
    return re.sub("[" + t + "]", "", s)
    
if __name__ == "__main__":
    print(remove("Programming Praxis", "aeiou"))
    print(remove2("Programming Praxis", "aeiou"))


Output:
1
2
Prgrmmng Prxs
Prgrmmng Prxs


Create a new paste based on this one


Comments: