<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cs.indstate.edu/web/index.php?action=history&amp;feed=atom&amp;title=Python_Keywords%2C_Concepts%2C_Functions</id>
	<title>Python Keywords, Concepts, Functions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://cs.indstate.edu/web/index.php?action=history&amp;feed=atom&amp;title=Python_Keywords%2C_Concepts%2C_Functions"/>
	<link rel="alternate" type="text/html" href="https://cs.indstate.edu/web/index.php?title=Python_Keywords,_Concepts,_Functions&amp;action=history"/>
	<updated>2026-04-14T21:47:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://cs.indstate.edu/web/index.php?title=Python_Keywords,_Concepts,_Functions&amp;diff=367&amp;oldid=prev</id>
		<title>Jkinne: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://cs.indstate.edu/web/index.php?title=Python_Keywords,_Concepts,_Functions&amp;diff=367&amp;oldid=prev"/>
		<updated>2025-08-17T13:22:22Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:22, 17 August 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki2:diff:1.41:old-366:rev-367 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jkinne</name></author>
	</entry>
	<entry>
		<id>https://cs.indstate.edu/web/index.php?title=Python_Keywords,_Concepts,_Functions&amp;diff=366&amp;oldid=prev</id>
		<title>wiki_previous&gt;Jkinne: /* Commonly Used Functions */</title>
		<link rel="alternate" type="text/html" href="https://cs.indstate.edu/web/index.php?title=Python_Keywords,_Concepts,_Functions&amp;diff=366&amp;oldid=prev"/>
		<updated>2022-09-07T15:36:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Commonly Used Functions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Following are terse descriptions for Python3 keywords, programming concepts, and commonly used functions.  For more information, see [https://www.w3schools.com/python/python_ref_keywords.asp w3schools] for a bit more explanation and [https://docs.python.org/3/reference/ python.org] for the language reference.  &lt;br /&gt;
&lt;br /&gt;
=Keywords=&lt;br /&gt;
The following are heavily used in all levels of Python programming.  This is a minimum set of keywords to know how to use.&lt;br /&gt;
* &amp;lt;code&amp;gt;break&amp;lt;/code&amp;gt; - exit the current loop&lt;br /&gt;
* &amp;lt;code&amp;gt;continue&amp;lt;/code&amp;gt; - in a loop, go to next iteration of the loop&lt;br /&gt;
* &amp;lt;code&amp;gt;is&amp;lt;/code&amp;gt; - determine whether two objects are the same object (not just value)&lt;br /&gt;
* &amp;lt;code&amp;gt;import, from&amp;lt;/code&amp;gt; - to load a module&lt;br /&gt;
* &amp;lt;code&amp;gt;def&amp;lt;/code&amp;gt; - declare a function&lt;br /&gt;
* &amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt; - loop with only condition&lt;br /&gt;
* &amp;lt;code&amp;gt;if, elif, else&amp;lt;/code&amp;gt; - conditional statements (three keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; - loop with that iterates through a list&lt;br /&gt;
* &amp;lt;code&amp;gt;return&amp;lt;/code&amp;gt; - keyword to send a value back from a function&lt;br /&gt;
* &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt; - boolean operator, True only if both sides are True&lt;br /&gt;
* &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt; - boolean operator, True if either side is True&lt;br /&gt;
* &amp;lt;code&amp;gt;not&amp;lt;/code&amp;gt; - boolean operator, negates&lt;br /&gt;
* &amp;lt;code&amp;gt;True, False&amp;lt;/code&amp;gt; - boolean values (two keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;del&amp;lt;/code&amp;gt; - remove from a list by position&lt;br /&gt;
* &amp;lt;code&amp;gt;try, except&amp;lt;/code&amp;gt; - handle an exception, basic use (2 keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;raise, assert&amp;lt;/code&amp;gt; - raise/indicate an exception (2 keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;in&amp;lt;/code&amp;gt; - test if something is inside of a list/string/tuple/dictionary&lt;br /&gt;
* &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt; - special value for a variable that has no value&lt;br /&gt;
* &amp;lt;code&amp;gt;pass&amp;lt;/code&amp;gt; - empty statement that does not do anything&lt;br /&gt;
&lt;br /&gt;
==More Keywords==&lt;br /&gt;
These keywords are often not introduced or heavily used until the second Python course.&lt;br /&gt;
* &amp;lt;code&amp;gt;as, finally, with, else&amp;lt;/code&amp;gt; - exception handling, more keywords (4 keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; - defining new class data type (for object-oriented programming)&lt;br /&gt;
* &amp;lt;code&amp;gt;lambda&amp;lt;/code&amp;gt; - create unnamed / anonymous function&lt;br /&gt;
* &amp;lt;code&amp;gt;global, nonlocal&amp;lt;/code&amp;gt; - access variables outside of current scope (2 keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;async, await&amp;lt;/code&amp;gt; - for writing asynchronous code with asynchio package (2 keywords)&lt;br /&gt;
* &amp;lt;code&amp;gt;yield&amp;lt;/code&amp;gt; - for creating generator functions&lt;br /&gt;
&lt;br /&gt;
=Concepts=&lt;br /&gt;
&amp;#039;&amp;#039;See [https://youtu.be/rB8jY3Y54_A this video] for a demo and explanation of basic data types and variables.&lt;br /&gt;
&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
These are terms that we use to describe programs.  These are terms that have a precise meaning when talking about programs.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039; - text data type&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;boolean&amp;#039;&amp;#039;&amp;#039; - data type for True and False&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;floating point&amp;#039;&amp;#039;&amp;#039; - data type that stores numbers with fractional parts (e.g., 3.14 or 2.2)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;integer&amp;#039;&amp;#039;&amp;#039; - data type that stores only integers&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; - a special value in Python that means &amp;quot;nothing&amp;quot; but is different than 0, False, and &amp;quot;&amp;quot;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;variable&amp;#039;&amp;#039;&amp;#039; - name for a place in memory to store values.  Two basic things you do with a variable - (i) store a value into the variable, (ii) get the value from the variable.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;keywords&amp;#039;&amp;#039;&amp;#039; - also called &amp;#039;&amp;#039;reserved&amp;#039;&amp;#039; words - these are names that should not be used for variable names because they have special meaning to python.  Example: &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; is used for loops and shouldn&amp;#039;t be used as a variable name.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039; - also called &amp;#039;&amp;#039;procedures&amp;#039;&amp;#039; or &amp;#039;&amp;#039;methods&amp;#039;&amp;#039; - name for a block of code that does something and that your code can use when needed.  Two basic things you can do with a function - (i) define what the function is (specify the code for the function), (ii) call the function later on in your code.  Three main parts of defining function - (a) function code (called the &amp;#039;&amp;#039;body&amp;#039;&amp;#039;), (b) function &amp;#039;&amp;#039;parameters&amp;#039;&amp;#039; (aka input variables), (c) function return values.  Three main parts of calling/using a function - (1) specify the &amp;#039;&amp;#039;arguments&amp;#039;&amp;#039; to the function (which are passed in to the parameters of the function), (2) &amp;#039;&amp;#039;call&amp;#039;&amp;#039; the function, (3) get the &amp;#039;&amp;#039;return&amp;#039;&amp;#039; value of the function.  Note that the &amp;#039;&amp;#039;function prototype&amp;#039;&amp;#039; refers to the line that declares the function, which has the function name, return type, and list of parameters to the function.  When a function is called, the arguments to the function are &amp;#039;&amp;#039;passed&amp;#039;&amp;#039; to the function (parameter variables are set equal to the arguments).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;flow chart&amp;#039;&amp;#039;&amp;#039; - diagram that shows the steps / flow of control in a program (also used to diagram decision-making in other settings - e.g., diagnosis of an illness, managing a factory, ...)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;binary operator&amp;#039;&amp;#039;&amp;#039; - operator that takes two values to produce a result.  An example is addition, 2 + 3 results in 5.  Another example is == comparison, &amp;#039;hi&amp;#039; == &amp;#039;bye&amp;#039; results in False because the two are not equal.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;unary operator&amp;#039;&amp;#039;&amp;#039; - operator that takes one value to produce a result.  An example is Boolean not, not True results in False.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;operator precedence&amp;#039;&amp;#039;&amp;#039; - rules for which operators are evaluated first in an expression.  For example, in 1 + 2 * 3, the multiplication is performed first, giving 1 + 6, and then the + is performed to result in 7.  For Python, see [https://docs.python.org/3/reference/expressions.html#evaluation-order python.org].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;operator associativity&amp;#039;&amp;#039;&amp;#039; - rule whether operators of the same type are evaluated left-to-right or right-to-left.  Math operators are left-to-right.  For Python, see [https://docs.python.org/3/reference/expressions.html#evaluation-order python.org].&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
[https://docs.python.org/3/library/stdtypes.html Python built-in types] - includes information on operations that come along with the builtin types.&lt;br /&gt;
&lt;br /&gt;
=Commonly Used Functions=&lt;br /&gt;
* &amp;lt;code&amp;gt;print&amp;lt;/code&amp;gt; - function to write to the screen&lt;br /&gt;
* &amp;lt;code&amp;gt;int, float, str&amp;lt;/code&amp;gt; - functions to convert to integer, floating point number, or string&lt;br /&gt;
* &amp;lt;code&amp;gt;range&amp;lt;/code&amp;gt; - function to generate a sequence of numbers&lt;br /&gt;
* &amp;lt;code&amp;gt;len&amp;lt;/code&amp;gt; - function to get the length of a string, list, or tuple&lt;br /&gt;
* &amp;lt;code&amp;gt;open, read, write, close&amp;lt;/code&amp;gt; - functions for reading/writing text files and options &amp;#039;r&amp;#039;, &amp;#039;w&amp;#039;, &amp;#039;a&amp;#039; for open&lt;br /&gt;
* string methods - &amp;lt;code&amp;gt;isalpha&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isdigit&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;split&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;join&amp;lt;/code&amp;gt;&lt;br /&gt;
* list methods - &amp;lt;code&amp;gt;sort, index, append, remove, copy&amp;lt;/code&amp;gt;&lt;br /&gt;
* tuple methods - &amp;lt;code&amp;gt;index, count&amp;lt;/code&amp;gt;&lt;br /&gt;
* dictionary methods - &amp;lt;code&amp;gt;keys, values, items&amp;lt;/code&amp;gt;&lt;br /&gt;
* syntax for using strings, lists, tuples dictionaries - &lt;br /&gt;
* methods in random module - &amp;lt;code&amp;gt;randint, shuffle&amp;lt;/code&amp;gt;&lt;br /&gt;
* methods in sys module - &amp;lt;code&amp;gt;exit, argv&amp;lt;/code&amp;gt; list&lt;br /&gt;
* methods from the copy module - &amp;lt;code&amp;gt;copy.deepcopy&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Assignment=&lt;br /&gt;
It is traditional to have a quiz where you must properly be able to identify all Python keywords and data types.  A quiz that you can practice with is - [https://indstate.instructure.com/courses/12565/quizzes/228163?module_item_id=1145854 Python Keywords and Data Types Quiz].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Pass rating check&amp;#039;&amp;#039;&amp;#039; If you are assigned this quiz in a course, you should be able to get 100% once you get comfortable with Python.&lt;/div&gt;</summary>
		<author><name>wiki_previous&gt;Jkinne</name></author>
	</entry>
</feed>