This is mainly me, documenting my learning about python.
There is only one way to comment in Python, using `#`
# print single line comment print("above is single line comment") # comments can be added # in seprate line too! print("how cool is that!") # everything after `#` is a comment
Strings can be created using single quote
' or double quote
Decorators are nothing but wrappers!
def wrapper(fn): def wrap(): print "do something before original function" fn() return wrap @wrapper def hello(): print "Hello world!" hello() # equivalent to # hello = wrapper(hello) # hello()
TODO: Need to learn about class decorator
TODO: learn more about it