title: create a new csv file in new subdirectory python 3.6
body: <p>Been having trouble with using variables in a new dirpath when using <code>with open</code> to create a csv file.
  I can create the dirpath fine along with the .csv filename and add them with os.path.join .
  But when i try to use the entire correctly formatted path in the open statement it is adding an extra backslash next to the current backslashes in the string?? could not find any documentation on why this may be happening.</p>
  
  <p>This is the error</p>
  
  <p><code>FileNotFoundError: [Errno 2] No such file or directory: 'Logs\\14-05-2018\\dfg.csv'</code></p>
  
  <p>If i simply write the following i can create the subfolders and csvs no problemo.</p>
  
  <p><code>with open(Logs\1234\asd.csv) 'w') as csvfile:</code></p>
  
  <p>So this is what i am getting an error in on line 43 which is the <code>with open(csvlogPath, 'w') as csvfile:</code> I have tried with <code>r</code> instead of 'w' and same problem. At a loss after two days time to ask you guys. :)</p>
  
  <pre><code>import csv, os.path
  
  #Get and create csv filename string
  logFN = input("Please name your trade.\n#")            
  suffix = '.csv'
  csvname = logFN + suffix
  #Create dir name string
  t = time.strftime("%d-%m-%Y-%H%M")
  dirsname = os.path.join('Logs', t)
  
  csvlogPath = os.path.join(dirsname,csvname)
  
  with open(csvlogPath, 'w') as csvfile:
      filewriter = csv.writer(csvfile, delimiter=',', lineterminator='\n', quotechar='|', quoting=csv.QUOTE_MINIMAL)
  
      filewriter.writerow(['get', 'new', 'values', 'later'])
  
  with open(csvlogPath, 'w') as f:
      reader = csv.reader(f)
   # read file row by row
      rwsCount = 0    
      for row in reader:        
          print (row, rwsCount)
          rwsCount += 1
  
  line_number = rwsCount-1
  print (line_number)
  
  with open(csvlogPath, 'w') as f:
      mycsv = csv.reader(f)
      mycsv = list(mycsv)
      text = mycsv[line_number][0]
  
  print (text) 
  </code></pre>