python - Passing a list as several arguments -


I am trying to use a list as arguments:

  & Gt; & Gt; & Gt; L = [1,2,3]> gt; & Gt; & Gt; Print (* L)   

I have an error:

  file "& lt; stdin>", line 1T * ^ syntax error: Invalid syntax   

I am using Python 2.7:

  gt; & Gt; Import systems and gt; & Gt; & Gt; Print sys.version 2.7.3 (default, 2 January 2013, 13:56:14) [GCC 4.7.2]   

What am I missing? Thanks! By default, print is not a function in Python 2.7.

. To use the function instead of a statement in a given module, use a future statement: __future__ import
  print_function   

go to the top Need your file, any code that is not a future statement (or module docstring), because the compiler sees the future statement first, the rest of the module differently predicts future statements.

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -