Answers for "get all characters after a specific character python"

2

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)
Posted by: Guest on February-08-2020
0

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'
Posted by: Guest on November-23-2020

Code answers related to "get all characters after a specific character python"

Python Answers by Framework

Browse Popular Code Answers by Language