Skip to content

How to fetch all chars of a string before a space in Python?

>>> s1.split(':')
['Username', ' How are you today?']
>>> s1.split(':')[0]
See also  CSS code snippet - How to make background transparent?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.