String statement has no effect
1import sys
2
3
4"""Simple calculator app""" 5
6
7def main():
Description
The string statement has not been assigned to anything. This is pointless and should be removed if not necessary. In case this is supposed to describe what's happening in the code, it is recommended to use comments or docstrings instead.
Not preferred:
'Define a function to add 2 numbers here.'
def add(a, b):
return a + b
Preferred:
Use Comments:
# Define a function to add 2 numbers here.
def add(a, b):
return a + b
or, use docstrings:
def add(a, b):
'''Function to add 2 numbers here.'''
return a + b