def _get_destination(script_parts):
 for part in script_parts:
  if ((part not in {'ln', '-s', '--symbolic'}) and os.path.exists(part)):
   return part

def _get_destination ( script_parts ) : for part in script_parts : if ( ( part not in { 'ln' , '-s' , '--symbolic' } ) and os . path . exists ( part ) ) : return part
when arguments order is wrong first argument will be destination .