# Reference guide: Python concepts from Course 7

## <span style="font-size: 20pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Google Cybersecurity Certificate</span>

---

<span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Comments</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following syntax is used to create a comment. (A comment is a note programmers make about the intention behind their code.)</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\#</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Starts a line that contains a Python comment</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\# Print approved usernames</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Contains a comment that indicates the purpose of the code that follows it is to print approved usernames</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">""" </span><span style="font-size: 14pt; font-family: 'Google Sans', sans-serif; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(documentation strings)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Starts and ends a multi-line string that is often used as a Python comment; </span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">multi-line comments are used when you need more than 79 characters in a single comment </span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"""</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The estimate\_attempts() function takes in a monthly</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">login attempt total and a number of months and</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">returns their product.</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"""</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Contains a multi-line comment that indicates the purpose of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">estimate\_attempts()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Conditional statements</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following keywords and operators are used in conditional statements. </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Starts a conditional statement</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if device\_id != "la858zn":</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Starts a conditional statement that evaluates whether the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">device\_id</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable contains a value that is not equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"la858zn"</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if user in approved\_list:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Starts a conditional statement that evaluates if the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">user</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable contains a value that is also found in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">approved\_list</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">elif</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Precedes a condition that is only evaluated when previous conditions evaluate to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; previous conditions include the condition in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statement, and when applicable, conditions in other </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">elif</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statements</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">elif status == 500:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">When previous conditions evaluate to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, evaluates if the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">status</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable contains a value that is equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">500</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">else</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Precedes a code section that only evaluates when all conditions that precede it within the conditional statement evaluate to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; this includes the condition in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statement, and when applicable, conditions in </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">elif</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statements </span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">else:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">When previous conditions evaluate to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, Python evaluates this </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">else</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statement</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">and</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Requires both conditions on either side of the operator to evaluate to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if username == "bmoreno" and login\_attempts &lt; 5:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Evaluates to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> if the value in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable is equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"bmoreno"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and the value in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">login\_attempts</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable is less than </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">or</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Requires only one of the conditions on either side of the operator to evaluate to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if status == 100 or status == 102:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Evaluates to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> if the value in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">status</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable is equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">100</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> or the value in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">status</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable is equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">102</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">not</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Negates a given condition so that it evaluates to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> if the condition is </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> if it is </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if not account\_status == "removed"</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Evaluates to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> if the value in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">account\_status</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable is equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"removed"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and evaluates to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> if the value is the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">account\_status</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable is not equal to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"removed"</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Iterative statements</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following keywords are used in iterative statements. </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Signals the beginning of a </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> loop; used to iterate through a specified sequence</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for username in \["bmoreno", "tshah", "elarson"\]:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Signals the beginning of a </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> loop that iterates through the sequence of elements in the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["bmoreno", "tshah", "elarson"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> using the loop variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for i in range(10):</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Signals the beginning of a </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">for</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> loop that iterates through a sequence of numbers created by </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">range(10)</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> using the loop variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">i</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">while</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Signals the beginning of a </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">while</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> loop; used to iterate based on a condition</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">while login\_attempts &lt; 5:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Signals the beginning of a </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">while</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> loop that will iterate as long as the condition that the value of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">login\_attempts</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is less than </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> evaluates to </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">break</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Used to break out of a loop</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">continue</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Used to skip a loop iteration and continue with the next one</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">User-defined functions</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following keywords are used when creating user-defined functions.</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">def</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Placed before a function name to define a function</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">def greet\_employee():</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Defines the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">greet\_employee()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">def calculate\_fails(total\_attempts, failed\_attempts):</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Defines the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">calculate\_fails()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function, which includes the two parameters of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">total\_attempts</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">failed\_attempts</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">return</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Used to return information from a function; when Python encounters this keyword, it exits the function after returning the information</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">def calculate\_fails(total\_attempts, failed\_attempts):</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> fail\_percentage = failed\_attempts / total\_attempts</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> return fail\_percentage</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the value of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">fail\_percentage</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable from the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">calculate\_fails()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Built-in functions</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following built-in functions are commonly used in Python.</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Outputs a specified object to the screen</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print("login success")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Outputs the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"login success"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the screen</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(9 &lt; 7)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Outputs the Boolean value of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">False</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the screen after evaluating whether the integer </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">9</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> is less than the integer </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">7</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">type()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the data type of its input</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(type(51.1))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the data type of float for the input of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">51.1</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(type(True))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the data type of Boolean for the input of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">True</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">range()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Generates a sequence of numbers</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">range(0, 5, 1)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Generates a sequence with a start point of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, a stop point of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and an increment of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; because the start point is inclusive but the stop point is exclusive, the generated sequence is </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">3</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">4</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">range(5)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Generates a sequence with a stop point of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; when the start point is not specified, it is set at the default value of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and when the increment is not specified, it is set at the default value of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; the generated sequence is </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">3</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">4</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">max()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the largest numeric input passed into it</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(max(10, 15, 5))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">15</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and outputs this value to the screen</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">min()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the smallest numeric input passed into it</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(min(10, 15, 5))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and outputs this value to the screen</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">sorted()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sorts the components of a list (or other iterable)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(sorted(\[10, 15, 5\]))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sorts the elements of the list from smallest to largest and outputs the sorted list of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\[5, 10, 15\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the screen </span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(sorted(\["bmoreno", "tshah", "elarson"\]))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sorts the elements in the list in alphabetical order and outputs the sorted list of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["bmoreno", "elarson", "tshah"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the screen</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">str()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts the input object to a string</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">str(10)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts the integer </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">10</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"10"</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">len()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns the number of elements in an object</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(len("security"))</span>

## <span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns and displays </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">8</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, the number of characters in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"security"</span>

##  

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Importing modules and libraries</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following keyword is used to import a module from the Python Standard Library or to import an external library that has already been installed.</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Searches for a module or library in a system and adds it to the local Python environment</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import statistics</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Imports the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">statistics</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> module and all of its functions from the Python Standard Library</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">from statistics import mean </span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Imports the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">mean()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">statistics</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> module from the Python Standard Library</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">from statistics import mean, median</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Imports the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">mean()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">median()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> functions of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">statistics</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> module from the Python Standard Library</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">String methods</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following methods can be applied to strings in Python. </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.upper()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a copy of the string in all uppercase letters</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print("Security".upper())</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns and displays a copy of the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"Security"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> as </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"SECURITY"</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.lower()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a copy of the string in all lowercase letters</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print("Security".lower())</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns and displays a copy of the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"Security"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> as </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"security"</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.index()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finds the first occurrence of the input in a string and returns its location</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print("Security".index("c"))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finds the first occurrence of the character </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"c"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"Security"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and returns and displays its index of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">List methods</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following methods can be applied to lists in Python. </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.insert()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Adds an element in a specific position inside the list</span>

<span style="font-size: 13pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list = \["elarson", "fgarcia", "tshah"\]</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list.insert(2,"wjaffrey")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Adds the element </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"wjaffrey"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> at index </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; the list becomes </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["elarson", "fgarcia", "wjaffrey", "tshah"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.remove()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Removes the first occurrence of a specific element inside a list</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list = \["elarson", "bmoreno", "wjaffrey", "tshah"\]</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list.remove("elarson")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Removes the element </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"elarson"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> from the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; the list becomes </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["fgarcia", "wjaffrey", "tshah"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.append()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Adds input to the end of a list</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list = \["bmoreno", "wjaffrey", "tshah"\]</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list.append("btang")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Adds the element </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"btang"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the end of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; the list becomes </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["fgarcia", "wjaffrey", "tshah", "btang"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.index()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finds the first occurrence of an element in a list and returns its index</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list = \["bmoreno", "wjaffrey", "tshah", "btang"\]</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(username\_list.index("tshah"))</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finds the first occurrence of the element </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"tshah"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and returns and displays its index of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Additional syntax for working with strings and lists</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following syntax is useful when working with strings and lists. </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">+ </span><span style="font-size: 14pt; font-family: 'Google Sans', sans-serif; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(concatenation)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Combines two strings or lists together</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">device\_id = "IT"+"nwp12"</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Combines the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"IT"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> with the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"nwp12"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and assigns the combined string of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"ITnwp12"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">device\_id</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">users = \["elarson", "bmoreno"\] + \["tshah", "btang"\]</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Combines the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["elarson", "bmoreno"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> with the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["tshah", "btang"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and assigns the combined list of </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["elarson", "bmoreno", "tshah", "btang"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">users</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\[\] </span><span style="font-size: 14pt; font-family: 'Google Sans', sans-serif; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(bracket notation)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Uses indices to extract parts of a string or list </span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print("h32rb17"\[0\])</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Extracts the character at index </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, which is (</span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"h"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">), from the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"h32rb17"</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print("h32rb17"\[0:3\])</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Extracts the slice </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\[0:3\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, which is (</span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"h32"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">), from the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"h32rb17"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; the first index in the slice (</span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">) is included in the slice but the second index in the slice (</span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">3</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">) is excluded</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list = \["elarson", "fgarcia", "tshah"\]</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">print(username\_list\[2\])</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Extracts the element at index </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, which is (</span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"tshah"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">), from the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username\_list</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Regular expressions</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> module function and regular expression symbols are useful when searching for patterns in strings. </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to a regular expression</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("a53", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["a53"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\\w</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Matches with any alphanumeric character; also matches with the underscore (</span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\_</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">)</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\w", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\w"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to any alphanumeric character and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["a", "5", "3", "3", "2", "c", "E"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Matches to all characters, including symbols</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall(".", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"."</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to all characters and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["a", "5", "3", "-", "3", "2", "c", " ", ".", "E"\]</span>

###  

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\\d</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Matches to all single digits</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\d", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\d"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to all single digits and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["5", "3", "3", "2"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\\s</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Matches to all single spaces</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\d", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\s"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to all single spaces and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\[" "\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\\.</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Matches to the period character</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\.", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\."</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to all instances of the period character and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["."\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">+</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Represents one or more occurrences of a specific character</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\w+", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\w+"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to one or more occurrences of any alphanumeric character and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["a53", "32c", "E"\]</span>

###  

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\*</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Represents, zero, one or more occurrences of a specific character</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\w\*", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\w\*"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to zero, one or more occurrences of any alphanumeric character and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["a53", " ", "32c", " ", " ", "E"\]</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">{ }</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Represents a specified number of occurrences of a specific character; the number is specified within the curly brackets</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import re</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">re.findall("\\w{3}", "a53-32c .E")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Returns a list of matches to the regular expression pattern </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"\\w{3}"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a53-32c .E"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">; matches to exactly three occurrences of any alphanumeric character and returns the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["a53","32c"\]</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">File operations</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following functions, methods, and keywords are used with operations involving files.</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Handles errors and manages external resources</span>

#### <span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open("logs.txt", "r") as file:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Used to handle errors and manage external resources while opening a file; </span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">the variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">file</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> stores the file information while inside of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statement; </span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">manages resources by closing the file after exiting the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> statement</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">open()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Opens a file in Python</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open("login\_attempts.txt", "r") as file:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Opens the file </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"login\_attempts.txt"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in order to read it </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">("r")</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open("update\_log.txt", "w") as file:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Opens the file </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"update\_log.txt"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> into the variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">file</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in order to write over its contents </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">("w")</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open(import\_file, "a") as file:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Opens the file assigned to the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">import\_file</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable into the variable </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">file</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> in order to append information to the end of it </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">("a")</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">as</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Assigns a variable that references another object</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open("logs.txt", "r") as file:</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Assigns the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">file</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable to reference the output of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">open()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function </span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.read()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts files into strings; returns the content of an open file as a string by default</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open("login\_attempts.txt", "r") as file:</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> file\_text = file.read()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts the file object referenced in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">file</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable into a string and then stores this string in the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">file\_text</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> variable</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.write()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Writes string data to a specified file</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">with open("access\_log.txt", "a") as file:</span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> file.write("jrafael")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Writes the string </span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"jrafael"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"access\_log.txt"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> file; because the second argument in the call to the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">open()</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> function is </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"a"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, this string is appended to the end of the file</span>

## <span style="font-size: 16pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Parsing</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The following methods are useful when parsing data.</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.split()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts a string into a list; separates the string based on the character that is passed in as an argument; if an argument is not passed in, it will separate the string each time it encounters whitespace characters such as a space or return</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">approved\_users = "elarson,bmoreno,tshah".split(",")</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"elarson,bmoreno,tshah"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> into the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["elarson","bmoreno","tshah"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> by splitting the string into a separate list element at each occurrence of the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">","</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> character</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">removed\_users = "wjaffrey jsoto abernard".split()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Converts the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"wjaffrey jsoto abernard"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> into the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["wjaffrey","jsoto","abernard"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> by splitting the string into a separate list element at each space</span>

### <span style="font-size: 14pt; font-family: 'Courier New', monospace; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.join()</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Concatenates the elements of an iterable into a string; takes the iterable to be concatenated as an argument; is appended to a character that will separate each element once they are joined into a string </span>

<span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">approved\_users = ",".join(\["elarson", "bmoreno", "tshah"\])</span>

<span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Concatenates the elements of the list </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">\["elarson","bmoreno","tshah"\]</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> into the string </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"elarson,bmoreno,tshah"</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> , separating each element with the </span><span style="font-size: 12pt; font-family: 'Courier New', monospace; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">","</span><span style="font-size: 12pt; font-family: 'Google Sans', sans-serif; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> character within the string</span>