Kernel: Python 3 (Anaconda)
Names first
In [35]:
What's a variable?
In [7]:
hello
In [13]:
'hello'
How to print in Jupyter?
In [25]:
hello
'hello'
Basic types: String? Integer? Float?
In [50]:
In [49]:
Higher level types: Tuple? List? Dictionary?
In [9]:
{1: 'Hi there', 2: 'Good-bye'}
In [16]:
How to check the type? And length!
In [25]:
<class 'tuple'>
<class 'int'>
[3, 4, 5, 6, 7, 8, 8]
Subscript/slice/subselect/reverse
In [104]:
(2, 3)
4
4
array([[1, 2, 3],
[4, 5, 6]])
Other types: np.array?, pd.DataFrame?
In [43]:
One big difference between np.array and lists
In [47]:
([1, 2, 3, 4, 1, 2, 3, 4], array([[ 2, 4, 6],
[ 8, 10, 12]]))
Format a string!
In [89]:
'10.20 hi 4'
In [96]:
'random something 2 3.5 hyoelllo'
In [101]:
('3.14', '3.14', '0003.14', '3.141593')
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]:
In [0]: