def set_content(): content_valid = False content_type, content = None, None while not content_valid: content_input = input( "\nPlease type in the absolute path of the " "file/directory\nIf you want to select " "multiple files, please add four colons(::::) " "between the file paths.\nDo not choose multiple" " directories or a combination of files and " "directories.\nYou can type in 'exit()' to exit.") check_user_exit(content_input) content = content_input.split("::::") judge = Judge(content) content_type, content = judge.judge_content() if content_type <= 0: print( "Wrong value received!\nDetails: {} Please Try again.".format( content)) else: content_valid = True return content_type, content