On 2018-10-24 10:58, ftg at lutix.org wrote: > if check_file(path,file_name): > return True > else: > return False Replace this with a simple return check_file(path, file_name) and now your functions share one line, and one that simply calls another function at that.