How to fetch all chars of a string before a space in Python? Subash Chandran 14th October 2021 Leave a Comment >>> s1.split(':') ['Username', ' How are you today?'] >>> s1.split(':')[0] 'Username' Curly hair, very fair, please share 🙂Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email this to a friend (Opens in new window) Related See also CSS code snippet - How to make background transparent? Snippets get everything before a string python, how to fetch all chars of a string before a space in python, python get string before character, python slice until character, python split before character, return string before character python, string all characters till python Change font size A Decrease font size. A Reset font size. A Increase font size.