Jump to content

Boston Python Workshop 6/Friday/Tutorial: Difference between revisions

imported>Jesstess
imported>Jesstess
Line 459:
</pre>
 
Use <code>==</code> to test for equality. Recall that <code>=</code> is used for <i>assignment</i> (e.g. <code>my_string == "Hello"</code>).
 
This is an important idea and can be a source of bugs until you get used to it: <b>= is assignment, == is comparison</b>.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.