title: Reducing the variable in calling a method in python
body: <p>I am using sklearn to perform linear regression. 
  If i do</p>
  
  <pre><code>reg = LinearRegression()
  reg.fit(x_matrix, y)
  </code></pre>
  
  <p>it works fine. 
  To reduce the code by removing the variable reg, i do</p>
  
  <pre><code>LinearRegression.reg.fit(x_matrix, y)
  </code></pre>
  
  <p>this gives me an error. Please explain the difference.</p>
  
  <p>Python version 3.7.6</p>