Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python remove punctuation from a string

# Python program to remove punctuation from a string

import string
text= 'Hello, W_orl$d#!'

# Using translate method
print(text.translate(str.maketrans('', '', string.punctuation)))
Source by itsmycode.com #
 
PREVIOUS NEXT
Tagged: #Python #remove #punctuation #string
ADD COMMENT
Topic
Name
5+6 =