title: Substrings of a string using Python
body: <p>How many <a href="https://en.wikipedia.org/wiki/Substring" rel="noreferrer">substrings</a> can you make out of a string like <code>abcd</code>?</p>
  
  <p>How can I get all of its substrings:</p>
  
  <pre><code>['a', 'b', 'c', 'd', 'ab', 'bc', 'cd', 'abc', 'bcd', 'abcd']
  </code></pre>