Python Method Chaining Javascript Snake Code C