Given a string s, partition s such that every substring of the partition is a palindrome; return the minimum cuts needed for a palindrome partitioning of s.
Implement min_cut(s), where s is a string and the result is an integer. A string containing no characters requires zero cuts.
def min_cut(s):