1. 튜플로 구성된 리스트 정렬test_list = [ (1,2,3), ..., (1,4,1) ] test_list = sorted(test_list, key=lambda x: x[2]) 2. non-blocking subprocess, Popen def subprocess_open(command): popen = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None, shell=True) while True: out = popen.stdout.read(1) if out == '' and popen.poll() is not None: break if out != '': sys.stdout.write(out) sys.stdout.flush()