import six


def is_string(value):
    """Return a boolean value indicating whether the value is a string or not.

    This method is compatible with both Python 2.7 and Python 3.x.
    NOTE:
    1. We can't use isinstance(string_value, str) because strings in Python 2.7 can have "unicode" type.
    2. We can't use isinstance(string_value, basestring) because "basestring" type is not available in Python 3.x.

    :param value: Value
    :type value: Any

    :return: Boolean value indicating whether the value is a string or not
    :rtype: bool
    """
    return isinstance(value, six.string_types)