Python Method Chaining Javascript Editor Code Python