title: Create a file with an input
body: <p>I have an issue with an open file. First I need to design the name of my file, then it supposed to create a file in a block note with format .txt. Also, I have to use %less in order to print the file.</p>
  <p>This is my code:</p>
  <pre><code>    def file():
         name=str(input(&quot;write the name of your file: &quot;)) 
         content=str(input(&quot;write : &quot;))
  
         with open(name+&quot;.txt&quot; , &quot;w&quot;) as newfile:
           newfile.write(content)
         %less name.txt
  
      file()
      leer_libro(&quot;name.txt&quot;) #it counts my letters of each line
  </code></pre>