<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Title
Step1:  Create Text
Step2:  Replace Character (Method 1)
Step3:  Replace Character (Method 2)
<ASSISTANT_TASK:>
Python Code:
# Import library
import re
Explanation: Title: Replace Characters
Slug: replace_characters
Summary: How to remove characters to clean unstructured text data for machine learning in Python. 
Date: 2016-09-06 12:00
Category: Machine Learning
Tags: Preprocessing Text
Authors: Chris Albon
Preliminaries
End of explanation
# Create text
text_data = ['Interrobang. By Aishwarya Henriette',
             'Parking And Going. By Karl Gautier',
             'Today Is The night. By Jarek Prakash']
Explanation: Create Text
End of explanation
# Remove periods
remove_periods = [string.replace('.', '') for string in text_data]
# Show text
remove_periods
Explanation: Replace Character (Method 1)
End of explanation
# Create function
def replace_letters_with_X(string: str) -> str:
    return re.sub(r'[a-zA-Z]', 'X', string)
# Apply function
[replace_letters_with_X(string) for string in remove_periods]
Explanation: Replace Character (Method 2)
End of explanation
<END_TASK>