 <p>Both lines are showing a single input that connects to the inputs of two separate gates. For example, this line:</p> <pre><code>self.A.connect([self.A1.A, self.I2.A]) </code></pre> <p>Is showing that the overall input <code>A</code> is wired to two inputs: input <code>A</code> on the AND gate A1 and input <code>A</code> on the NOT gate <code>I2</code>. That's indicated in the wiring diagram by the red circle/square:</p> <p><img src="https://i.stack.imgur.com/HTOo7.png" alt="Annotated wiring diagram"></p> <p>The line <code>self.B.connect([self.I1.A, self.A2.A])</code> does the same thing with the <code>B</code> input to the XOR gate, wiring it to <code>I1</code> and <code>A2</code> (the blue circle above).</p> <hr> <p>The error you saw with <code>print</code> is because it is a function in Python 3. For Python 2.x, you just do <code>print "Stuff I want printed"</code>.</p>