<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Python Language Syntax
Python was originally developed as a teaching language
The cleanliness of Python's syntax has led some to call it "executable pseudocode"
Syntax refers to the structure of the language (i.e., what constitutes a correctly-formed program).
For the time being, we'll not focus on the semantics - the meaning of the words and symbols within the syntax - but will return to this at a later point.
Example
Step1:  This script is a bit silly, but it compactly illustrates several of the important aspects of Python syntax.
Let's walk through it and discuss some of the syntactical features of Python
Comments Are Marked by #
The script starts with a comment (this means that python won't read this line....very useful!)
Step2:  It is also possible to continue expressions on the next line within parentheses (or brackets), without using the "\" marker
Step3:  The best way is to use the line continuation (within parentheses).
Semicolon Can Optionally Terminate a Statement
Sometimes it can be useful to put multiple statements on a single line.
The next portion of the script is
python
lower = []; upper = []
This shows the example of how the semicolon (;) familiar in C can be used optionally in Python to put two statements on a single line.
This is exactly the same as writing the below in python
Step4:  Python's use of meaningful whitespace leads to much more consistent and readable code than languages that do not enforce indentation of code blocks.
Whitespace Within Lines Does Not Matter
While the mantra of meaningful whitespace holds true for whitespace before lines (which indicate a code block), white space within lines of Python code does not matter.
For example, all three of these expressions are equivalent
Step5:  Abusing this flexibility can lead to issues with code readibility – in fact, abusing white space is often one of the primary means of intentionally obfuscating code (which some people do for sport).
Using whitespace effectively can lead to much more readable code, 
especially in cases where operators follow each other – compare the following two expressions for exponentiating by a negative number
Step6:  They can also be used to indicate that a function is being called.
Step7:  The "()" after sort indicates that the function should be executed, and is required even if no arguments are necessary.
Strings!
One of the most simple and important aspects of python you will be using constantly, will be strings! 
Strings are designated by single or double quotation marks. 
``` python
"This is my python string" 
'This is my second python string'
``` 
We will be using 'strings' throughout our whole python lifetime. 
Things to remember
<ASSISTANT_TASK:>
Python Code:
# set the midpoint
midpoint = 5
# make two empty lists
lower = []; upper = []
# split the numbers into lower and upper
for i in range(10):
    if (i < midpoint):
        lower.append(i)
    else:
        upper.append(i)
        
print("lower:", lower)
print("upper:", upper)
Explanation: Python Language Syntax
Python was originally developed as a teaching language
The cleanliness of Python's syntax has led some to call it "executable pseudocode"
Syntax refers to the structure of the language (i.e., what constitutes a correctly-formed program).
For the time being, we'll not focus on the semantics - the meaning of the words and symbols within the syntax - but will return to this at a later point.
Example
End of explanation
x = 1 + 2 + 3 + 4 +\
    5 + 6 + 7 + 8
Explanation: This script is a bit silly, but it compactly illustrates several of the important aspects of Python syntax.
Let's walk through it and discuss some of the syntactical features of Python
Comments Are Marked by #
The script starts with a comment (this means that python won't read this line....very useful!):
``` python
set the midpoint
`
Comments in Python are indicated by#``, and anything on the line following the numbers sign is ignored by the interpreter.
This means, for example, that you can have stand-alone comments like the one just shown, as well as inline comments that follow a statement. For example:
python
x += 2  # shorthand for x = x + 2
So above, Python reads the first bit of code, but ignores the 'comment' 
End-of-Line Terminates a Statement
The next line in the script is
python
midpoint = 5
This is an assignment operation, where we've created a variable named midpoint and assigned it the value 5.
Notice that the end of this statement is simply marked by the end of the line.
In Python, if you'd like a statement to continue to the next line, it is possible to use the "\" marker to indicate this:
End of explanation
x = (1 + 2 + 3 + 4 +
     5 + 6 + 7 + 8)
Explanation: It is also possible to continue expressions on the next line within parentheses (or brackets), without using the "\" marker:
End of explanation
x = 5
if x < 4:
    y = x * 2
    print(x)
x = 5
if x < 4:
    y = x * 2
print(x)
Explanation: The best way is to use the line continuation (within parentheses).
Semicolon Can Optionally Terminate a Statement
Sometimes it can be useful to put multiple statements on a single line.
The next portion of the script is
python
lower = []; upper = []
This shows the example of how the semicolon (;) familiar in C can be used optionally in Python to put two statements on a single line.
This is exactly the same as writing the below in python:
python
lower = []
upper = []
Using a semicolon to put multiple statements on a single line is generally discouraged by most Python style guides, though occasionally it proves convenient.
Indentation: Whitespace Matters!
we must use indentation (or more specific - 4 spaces!) 
The top line will be the controlling statement.
indented code blocks are always preceded by a colon (:)
Anything indended below this top line will occur within it. 
For example, the following two snippets will produce different results!
End of explanation
x=1+2
x = 1 + 2
x             =        1    +                2
Explanation: Python's use of meaningful whitespace leads to much more consistent and readable code than languages that do not enforce indentation of code blocks.
Whitespace Within Lines Does Not Matter
While the mantra of meaningful whitespace holds true for whitespace before lines (which indicate a code block), white space within lines of Python code does not matter.
For example, all three of these expressions are equivalent:
End of explanation
2 * (3 + 4)
Explanation: Abusing this flexibility can lead to issues with code readibility – in fact, abusing white space is often one of the primary means of intentionally obfuscating code (which some people do for sport).
Using whitespace effectively can lead to much more readable code, 
especially in cases where operators follow each other – compare the following two expressions for exponentiating by a negative number:
python
x=10**-2
to
python
x = 10 ** -2
I find the second version with spaces much more easily readable at a single glance.
Most Python style guides recommend using a single space around binary operators, and no space around unary operators.
We'll discuss Python's operators further in Basic Python Semantics: Operators.
Parentheses Are for Grouping or Calling
In the previous code snippet, we see two uses of parentheses.
First, they can be used in the typical way to group statements or mathematical operations:
End of explanation
# example
L = [4,2,3,1]
L.sort()
print(L)
Explanation: They can also be used to indicate that a function is being called.
End of explanation
x = "4" 
print("String: ", type(x),      x)
x = int(x)
print("Integer: ", type(x),    x)
x = float(x)
print("Float: ", type(x),    x)
Explanation: The "()" after sort indicates that the function should be executed, and is required even if no arguments are necessary.
Strings!
One of the most simple and important aspects of python you will be using constantly, will be strings! 
Strings are designated by single or double quotation marks. 
``` python
"This is my python string" 
'This is my second python string'
``` 
We will be using 'strings' throughout our whole python lifetime. 
Things to remember:
1) Strings are not numbers. You'd have to convert them to a number.
End of explanation
<END_TASK>