Python assignment destructuring
According to dis, they all get compiled to the same bytecode: >>> def f1(line): … a,b,c = line.split() … >>> def f2(line): … (a,b,c) = line.split() … >>> def f3(line): … [a,b,c] = line.split() … >>> import dis >>> dis.dis(f1) 2 0 LOAD_FAST 0 (line) 3 LOAD_ATTR 0 (split) 6 CALL_FUNCTION 0 9 UNPACK_SEQUENCE 3 … Read more