pylint-errors

R1722 (consider-using-sys-exit)

:x: Problematic code:

if __name__ == '__main__':
    user = input('Enter user name: ')
    print(f'Hello, {user}')
    exit(0)

:heavy_check_mark: Correct code:

import sys

if __name__ == '__main__':
    user = input('Enter user name: ')
    print(f'Hello, {user}')
    sys.exit(0)

Rationale:

Instead of using exit() or quit(), consider using the sys.exit().