title: open file.txt and store into variable using argparse
body: <p>how do i have to open file.txt and store the value into 2 variables name inputfileone and inputfiletwo but the error keep confusing me....even file location is true...when i run the command </p>
  
  <blockquote>
    <p>python task.py -f fileone.txt -t filetwo.txt</p>
  </blockquote>
  
  <p><em>error = with open(inputfileone, 'r') as fileone:
  FileNotFoundError: [Errno 2] No such file or directory: ''</em></p>
  
  <p>below is my code...</p>
  
  <pre><code>import argparse
  
  #read file from var inputfileone argparse
  with open(inputfileone, 'r') as fileone:
        for line in fileone: 
            .....
  
  #read file from var inputfiletwo argparse   
  with open(inputfiletwo, 'r') as filetwo:
        for line in filetwo: 
  
  
  parser = argparse.ArgumentParser()
  parser.add_argument("-f","-inputfile1", type=argparse.FileType('r'), help = "file one")
  parser.add_argument("-t","-inputfile2", type=argparse.FileType('r'), help = "file two")
  args = parser.parse_args()
  
  inputfileone = args.inputfile1 #store value to 'with open(inputfileone, 'r') as fileone:'
  inputfiletwo = args.inputfile2 
  </code></pre>