4 examples of 'name, *line = input().split()' in Python

Every line of 'name, *line = input().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
this disclaimer
21def splitter(line):
22 return line.split()
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

11def read_input(file):
12 for line in file:
13 line = re.split('[^a-z]+', line.lower())
14 yield line
37def split(line):
38 """
39 Operator function for splitting a line with csv module
40 """
41 reader = csv.reader(StringIO(line))
42 return reader.next()
31@staticmethod
32def _cleverSplit(line):
33 # Split tokens (keeping quoted strings intact).
34
35 PATTERN = re.compile(r"""(
36 \s | \] | \[ | \, | = | # Match whitespace, braces, comma, =
37 ".*?[^\\]" | '.*?[^\\]' # Match single/double-quotes.
38 )""", re.X)
39 return [p for p in PATTERN.split(line) if p.strip()]

Related snippets