1# this is a single line comment, python ignores these
2foo = "bar" # can be placed after code
3
4"""
5python doesnt have multiline comments
6so multiline strings do the tricks
7
8this works because python ignores string literals that arentassigned to a varaible
9"""
10
11# comments can be used as notes for the dude editing the script
1# Numpy-style python comments for functions
2def foo(param_1=True):
3 """Example function.
4
5 Parameters
6 ----------
7 param_1 : bool, optional
8 The first parameter (default is True)
9
10 Returns
11 -------
12 num
13 a number
14 """
15 return -1
16
17
1# This is a one line comment
2
3"""
4This is a comment for multiple lines,
5as you can see
6"""
7
8""" But also this is valid """
1# Single line Comment
2
3"""
4 (''' single quotes ''') will also work
5 Multi Line
6 Comment
7"""