Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Open the file in read mode
- with open('input.txt', 'r') as file:
- content = file.read()
- # Replace occurrences of ```python with ":"
- updated_content = content.replace("```python", "")
- updated_content = updated_content.replace("```", "")
- updated_content = updated_content.replace("**Option", "Option")
- updated_content = updated_content.replace(")**", ")")
- updated_content = updated_content.replace("`", "")
- updated_content = updated_content.replace("‘", "'")
- updated_content = updated_content.replace("’", "'")
- # Write the updated content back to the file
- with open('output.txt', 'w') as file:
- file.write(updated_content)
- print("Replacement done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement