title: Convert Matlab codes to Python
body: <p>I have to convert some small codes of my friend from Matlab to Python, I was trying to find a good translation of &quot;assign&quot; word in Matlab, but Unfortunately with no answer.
  Would you please help me with this piece of code in Matlab and translated it to Python, I got stuck at the last line especially. Thanks for your help</p>
  <pre><code>function importfile1(fileToRead1)
  
  %IMPORTFILE1(FILETOREAD1)%  Imports data from the specified file %  FILETOREAD1:  file to read % Import the file
  
  newData1 = load('-mat', fileToRead1);
  
  % Create new variables in the base workspace from those fields.
  
  vars = fieldnames(newData1);
  for i = 1:length(vars)
      assignin('base', vars{i}, newData1.(vars{i}));
  end
  </code></pre>