title: Difference between methods and functions, in Python compared to C++
body: <p>I'm doing Code Academy's tutorials on Python, and I'm a bit confused about the definition of method and function. From the tutorial:</p>
  
  <blockquote>
    <p>You already know about some of the built-in functions we've used on (or to create) strings, such as <code>.upper()</code>, <code>.lower()</code>, <code>str()</code>, and <code>len()</code>. </p>
  </blockquote>
  
  <p>Coming from C++, I would think <code>.upper()</code> and <code>.lower()</code> would be called methods and <code>len()</code> and <code>str()</code> functions. In the tutorial, the terms seem to be used interchangeably.</p>
  
  <p>Does Python distinguish between methods and functions in the way C++ does?</p>
  
  <p>Unlike <a href="https://stackoverflow.com/q/155609">Difference between a method and a function</a>, I'm asking about the particulars of Python. The terms 'method' and 'function' do not seem to always follow the definition given in the accepted answer of the linked question.</p>