Generate Random Hash String Python Definition Function