How to use 'input().strip().split(' ')' in Python

Every line of 'input().strip().split(' ')' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
126def split_string(input_string):
127 '''Split a string to a list and strip it
128 :param input_string: A string that contains semicolons as separators.
129 '''
130 string_splitted = input_string.split(';')
131 # Remove whitespace at the beginning and end of each string
132 strings_striped = [string.strip() for string in string_splitted]
133 return strings_striped

Related snippets