title: Getting selected text from path in python
body: <p>My variable has name like this:</p>
  
  <pre><code>var1 = '/home/name/file.txt'
  </code></pre>
  
  <p>How to just get name of file in variable?</p>
  
  <p>I need my variable like this:</p>
  
  <pre><code>var1 = 'file.txt'
  </code></pre>