<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>6. Simple statements </title> <META NAME="description" CONTENT="6. Simple statements "> <META NAME="keywords" CONTENT="ref"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <meta http-equiv="Content-Type" content="text/html; charset="> <link rel="STYLESHEET" href="ref.css"> <link rel="first" href="ref.html"> <link rel="contents" href="contents.html" title="Contents"> <link rel="index" href="genindex.html" title="Index"> <LINK REL="next" href="compound.html"> <LINK REL="previous" href="expressions.html"> <LINK REL="up" HREF="ref.html"> <LINK REL="next" href="exprstmts.html"> </head> <body> <DIV CLASS="navigation"> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> <td><A href="summary.html"><img src="../icons/previous.gif" border="0" height="32" alt="Previous Page" width="32"></A></td> <td><A HREF="ref.html"><img src="../icons/up.gif" border="0" height="32" alt="Up One Level" width="32"></A></td> <td><A href="exprstmts.html"><img src="../icons/next.gif" border="0" height="32" alt="Next Page" width="32"></A></td> <td align="center" width="100%">Python Reference Manual</td> <td><A href="contents.html"><img src="../icons/contents.gif" border="0" height="32" alt="Contents" width="32"></A></td> <td><img src="../icons/blank.gif" border="0" height="32" alt="" width="32"></td> <td><A href="genindex.html"><img src="../icons/index.gif" border="0" height="32" alt="Index" width="32"></A></td> </tr></table> <b class="navlabel">Previous:</b> <a class="sectref" href="summary.html">5.12 Summary</A> <b class="navlabel">Up:</b> <a class="sectref" HREF="ref.html">Python Reference Manual</A> <b class="navlabel">Next:</b> <a class="sectref" href="exprstmts.html">6.1 Expression statements</A> <br><hr> </DIV> <!--End of Navigation Panel--> <H1><A NAME="SECTION008000000000000000000"> </A> <BR> 6. Simple statements </H1> <a name="l2h-298"> </a> <P> Simple statements are comprised within a single logical line. Several simple statements may occur on a single line separated by semicolons. The syntax for simple statements is: <P> <dl><dd class="grammar"> <div class="productions"> <table cellpadding="2"> <tr valign="baseline"> <td><code><a name="tok-simple_stmt">simple_stmt</a></code></td> <td> ::= </td> <td><code><a href="exprstmts.html#tok-expression_stmt">expression_stmt</a> | <a href="">assert_stmt</a> | <a href="assignment.html#tok-assignment_stmt">assignment_stmt</a> | <a href="augassign.html#tok-augmented_assignment_stmt">augmented_assignment_stmt</a> | <a href="pass.html#tok-pass_stmt">pass_stmt</a> | <a href="del.html#tok-del_stmt">del_stmt</a> | <a href="print.html#tok-print_stmt">print_stmt</a> | <a href="return.html#tok-return_stmt">return_stmt</a> | <a href="yield.html#tok-yield_stmt">yield_stmt</a> | <a href="raise.html#tok-raise_stmt">raise_stmt</a> | <a href="break.html#tok-break_stmt">break_stmt</a> | <a href="continue.html#tok-continue_stmt">continue_stmt</a> | <a href="import.html#tok-import_stmt">import_stmt</a> | <a href="global.html#tok-global_stmt">global_stmt</a> | <a href="exec.html#tok-exec_stmt">exec_stmt</a></code></td></tr> </table> </div> <a class="grammar-footer" href="grammar.txt" type="text/plain" >Download entire grammar as text.</a> </dd></dl> <P> <p><hr> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> <LI><A href="exprstmts.html">6.1 Expression statements</a> <LI><A href="assert.html">6.2 Assert statements</a> <LI><A href="assignment.html">6.3 Assignment statements</a> <UL> <LI><A href="augassign.html">6.3.1 Augmented Assignment statements</a> </ul> <LI><A href="pass.html">6.4 The <tt class="keyword">pass</tt> statement</a> <LI><A href="del.html">6.5 The <tt class="keyword">del</tt> statement</a> <LI><A href="print.html">6.6 The <tt class="keyword">print</tt> statement</a> <LI><A href="return.html">6.7 The <tt class="keyword">return</tt> statement</a> <LI><A href="yield.html">6.8 The <tt class="keyword">yield</tt> statement</a> <LI><A href="raise.html">6.9 The <tt class="keyword">raise</tt> statement</a> <LI><A href="break.html">6.10 The <tt class="keyword">break</tt> statement</a> <LI><A href="continue.html">6.11 The <tt class="keyword">continue</tt> statement</a> <LI><A href="import.html">6.12 The <tt class="keyword">import</tt> statement</a> <LI><A href="global.html">6.13 The <tt class="keyword">global</tt> statement</a> <LI><A href="exec.html">6.14 The <tt class="keyword">exec</tt> statement</a> </ul> <!--End of Table of Child-Links--> <DIV CLASS="navigation"> <p><hr> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> <td><A href="summary.html"><img src="../icons/previous.gif" border="0" height="32" alt="Previous Page" width="32"></A></td> <td><A HREF="ref.html"><img src="../icons/up.gif" border="0" height="32" alt="Up One Level" width="32"></A></td> <td><A href="exprstmts.html"><img src="../icons/next.gif" border="0" height="32" alt="Next Page" width="32"></A></td> <td align="center" width="100%">Python Reference Manual</td> <td><A href="contents.html"><img src="../icons/contents.gif" border="0" height="32" alt="Contents" width="32"></A></td> <td><img src="../icons/blank.gif" border="0" height="32" alt="" width="32"></td> <td><A href="genindex.html"><img src="../icons/index.gif" border="0" height="32" alt="Index" width="32"></A></td> </tr></table> <b class="navlabel">Previous:</b> <a class="sectref" href="summary.html">5.12 Summary</A> <b class="navlabel">Up:</b> <a class="sectref" HREF="ref.html">Python Reference Manual</A> <b class="navlabel">Next:</b> <a class="sectref" href="exprstmts.html">6.1 Expression statements</A> <hr> <span class="release-info">Release 2.2, documentation updated on December 21, 2001.</span> </DIV> <!--End of Navigation Panel--> <ADDRESS> See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. </ADDRESS> </BODY> </HTML>