text: 6. Simple statements¶
  Simple.)
  6.2. Assignment statements¶statement in the current code block: the name is bound to the object in the current local namespace.
  - Otherwise: the name is bound to the object in the current global namespace...)).
  6.6. The
  print statement¶
  print_stmt ::= "print" ([
  expression(","
  expression)* [","]] | ">>"
  expression[(","
  expression)+ [","]])
  ' ', or (3) when the last
  write operation on standard output was not a
  Note
  Objects which act like file objects but which are not the built-in file objects often do not properly emulate this aspect of the file object’s behavior, so it is best not to rely on this.
  A
  '\n' character is written at the end, unless the
  Standard output is defined as the file object named
  stdout in the built-in
  module
  sys. If no such object exists, or if it does not have a
  write() method, a
  RuntimeError exception is raised.
  >> must evaluate to a
  “file-like” object, specifically an object that has a
  write() method as
  described above. With this extended form, the subsequent expressions are
  printed to this file object. If the first expression evaluates to
  None,
  then
  sys.stdout is used as the file for output.
  6.
  6.8. The
  yield statement¶.
  For full details of
  yield semantics, refer to the Yield expressions
  section.
  Note
  In Python 2.2, the
  yield statement was only allowed when the
  generators feature has been enabled. This
  __future__
  import statement was used to enable the feature:
  from __future__ import generators
  6.9. The
  raise statement¶.
  6.
  6.11..
  6.12. The
  import statement¶
  import_stmt ::= "import"
  module["as"
  name] ( ","
  module["as"
  name] )* | "from"
  relative_module"import"
  identifier["as"
  name] ( ","
  identifier["as"
  name] )* | "from"
  relative_module"import" "("
  identifier["as"
  name] ( ","
  identifier["as"
  name] )* [","] ")" | "from"
  module"import" "*" module ::= (
  identifier".")*
  identifierrelative.
  6.12.1. Future statements¶ module docstring (if any),
  - blank lines, and
  - other future statements.
  The features recognized by Python 2.6 are
  unicode_literals,
  print_function,
  absolute_import,
  division,
  generators,
  nested_scopes and
  with_statement.
  generators,
  with_statement,
  nested_scopes are redundant in Python version 2.
  6.13..
  6.14. The
  exec statement¶
  exec_stmt ::= "exec"
  or_expr["in"
  expression[","
  expression]]
  This statement supports dynamic execution of Python code. The first expression
  should evaluate to either a Unicode string, a Latin-1 encoded.
  Remember that at module level, globals and locals are the same dictionary. If
  two separate objects are given as globals and locals, the code will be
  executed as if it were embedded in a class definition.
  The first expression may also be a tuple of length 2 or 3. In this case, the
  optional parts must be omitted. The form
  exec(expr, globals) is equivalent
  to
  exec expr in globals, while the form
  exec(expr, globals, locals) is
  equivalent to
  exec expr in globals, locals. The tuple form of
  exec
  provides compatibility with Python 3, where
  exec is a function rather than
  a statement..
  Footnotes