Warning: The magic method HM\BackUpWordPress\Notices::__wakeup() must have public visibility in /hosting/mlk/html/wp-content/plugins/backupwordpress/classes/class-notices.php on line 46

Warning: The magic method HM\BackUpWordPress\Path::__wakeup() must have public visibility in /hosting/mlk/html/wp-content/plugins/backupwordpress/classes/class-path.php on line 57

Warning: The magic method HM\BackUpWordPress\Extensions::__wakeup() must have public visibility in /hosting/mlk/html/wp-content/plugins/backupwordpress/classes/class-extensions.php on line 35
필요없는 문자열 제거 파이썬 치트코드 – Go Lab

필요없는 문자열 제거 파이썬 치트코드

Untitled4
In [5]:
def clean_special_chars(text, punct):
    for p in punct:
        text = text.replace(p, ' ')
    return text
In [8]:
text = "Hi, Welcome to machinelearning korea (very good), ^.^"
punct = "/-'?!.,#$%\'()*+-/:;<=>@[\\]^_`{|}~`" + '""“”’' + '∞θ÷α•à−β∅³π‘₹´°£€\×™√²—–&'
In [9]:
clean_special_chars(text, punct)
Out[9]:
'Hi  Welcome to machinelearning korea  very good      '

답글 남기기