()
return sys.version_info > (3, 0)
Check if the Python interpreter is Python 2 or 3.

    Returns:
        bool: True if the Python interpreter is Python 3 and False otherwise.
Check if the Python interpreter is Python 2 or 3.
Check if the Python interpreter is Python 2 or 3 .
def is_python_3():
    """Check if the Python interpreter is Python 2 or 3.

    Returns:
        bool: True if the Python interpreter is Python 3 and False otherwise.
    """
    return sys.version_info > (3, 0)
def is_python_3 ( ) : return sys . version_info > ( 3 , 0 )