Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
how to fetch all chars of a string before a space in python
mikemelon
Programming language:
Python
2021-06-17 23:35:02
0
Q:
how to fetch all chars of a string before a space in python
Samthere
Code:
Python
2021-07-12 17:39:29
>>> s1.split(':') ['Username', ' How are you today?'] >>> s1.split(':')[0] 'Username'
1
Tags
string
python
how
Related
add whitespaces between char python
python string remove whitespace and newlines
how to remove all characters from a string in python
python flask how to remove last character from string
python trim whitespace from end of string
python remove last characters from string
how to print without space in python 3
python extract all characters from string before a character
python remove last part of string
python print without space
python remove last character from string
python how to get rid of spaces in print
python convert remove spaces from beginning of string
python remove similar string with whitespace from list
remove all whitespace from string python
python remove whitespace from start of string
how to remove last character from string in python
New to Communities?
Join the community