how to take a part of string before a character in python code example
Example: how to fetch all chars of a string before a space in python
>>> s1.split(':')
['Username', ' How are you today?']
>>> s1.split(':')[0]
'Username'
>>> s1.split(':')
['Username', ' How are you today?']
>>> s1.split(':')[0]
'Username'