old_contents: from os.path import expanduser
  
  
  def get_data_path(data_path_fname):
      """
      Returns first line of given filename in home directory
      """
      home = expanduser("~")
      f = open(home + "/data_path.txt")
      data_path = f.readline()
      f.close()
      
      return data_path
new_contents: from os.path import expanduser
  
  
  def get_data_path(data_path_fname):
      """
      Returns first line of given filename in home directory
      """
      home = expanduser("~")
      f = open(home + "/data_path.txt")
      data_path = f.readline().strip()
      f.close()
      
      return data_path
subject: remove newline at end of line