We use the following code to match and print any single character in the given string using python regular expression.this matches any single character in the given string
import re foo = 'https://www/twitter/index.php 403' result = re.findall(r'.', foo) print result
This gives the output
['h', 't', 't', 'p', 's', ':', '/', '/', 'w', 'w', 'w', '/', 't', 'w', 'i', 't', 't', 'e', 'r', '/', 'i', 'n', 'd', 'e', 'x', '.', 'p', 'h', 'p', ' ', '4', '0', '3']