get all characters after a specific character python code example
Example 1: python get all characters
import string
# all the lowercase and uppercase letters
print(string.ascii_letters)
# every printable key on your keyboard
print(string.printable)
# every digit
print(string.digits)
Example 2: python extract all characters from string before a character
s1 = "Username: How are you today?"
>>> s1.split(':')
['Username', ' How are you today?']
>>> s1.split(':')[0]
'Username'