def sha1 ( s ) : h = hashlib . new ( 'sha1' ) h . update ( s ) return h . hexdigest ( )
python sha1 hashed string
Returns a sha1 of the given string
def sha1(s):
    """ Returns a sha1 of the given string
    """
    h = hashlib.new('sha1')
    h.update(s)
    return h.hexdigest()