Update min_cut.py

updated code to account for key disappearing. code still needs work/