Python intro notes

This commit is contained in:
2019-09-27 00:06:03 +02:00
parent ea7fd79d11
commit c9cc068203
17 changed files with 471 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
"""
In python, all things are object.
This means that all functionality associated with a piece of data is stored with the data.
"""
# Making a new integer with the int constructor:
a = int(5)
b = int(4)
# Adding them together
print(a + b)
# Or without the read macro and function call:
print(a.__add__(b).__repr__())
# The most useful method ever
print("Hello {}\nI am {}".format("people who are still here", "the master of the .format method on strings"))