In [ ]:
a = 1  # comment

In [ ]:
a = 1  # comment # b = 2

In [ ]:
# a = 1

In [ ]:
a = 1
# b = 2
# c = 3
# d = 4
e = 5

In [ ]:
# No:
a = 1 # comment

# Yes:
a = 1  # comment

a = 1      # comment
xyz = 100  # comment

In [ ]:
# No:
a = 1  #comment
a = 1  #  comment

# Yes:
a = 1  # comment

In [ ]:
# No:
#comment

# Yes:
# comment
#     indented comment

In [ ]:
# No:
## comment

# Yes:
# comment

In [ ]:
def test(a, b):
    '''docstring
    description
    '''
    print(a)
    print(b)

In [ ]:
a = 1
'''
b = 2
c = 3
d = 4
'''
e = 5

In [ ]:
def test(a, b):
    print(a)
    '''
    comment line1
    comment line2
    comment line3
    '''
    print(b)

In [ ]:
def test(a, b):
    print(a)
'''
comment line1
comment line2
comment line3
'''
    print(b)

# IndentationError: unexpected indent

In [ ]:
def test(a, b):
    print(a)
    # comment line1
    # comment line2
    # comment line3
    print(b)

In [ ]:
def test(a, b):
    print(a)
# comment line1
# comment line2
# comment line3
    print(b)