def longestString(listOfStrings):
    """
    return longest string from a non-empty list of strings, False otherwise

    By "longest", we mean a value that is no shorter than any other value in the list

    There may be more than one string that would qualify,
      For example in the list ["dog","bear","wolf","cat"] both  bear and wolf are longest strings
      In such cases, return the one with the lowest index (in this case, bear)

    return False for empty list, not a list, or a list with at least one non-string item

    >>> longestString([])
    False
    >>> longestString('foo')
    False
    >>> longestString(['foo'])
    'foo'
    >>> longestString(['bear','cat','dog','mouse'])
    'mouse'
    >>> longestString(['cat','wolf','bear','dog'])
    'wolf'
    >>>
    """
    if type(listOfStrings)!=list or listOfStrings==[]:
        return False

    longestString = listOfStrings[0]
    for string in listOfStrings:
        if type(string)!=str:
            return False

        if len(string) > len(longestString):
            longestString = string
    return longestString