| Store | Cart

Re: [Tutor] what is the basic difference

From: Alan Gauld <alan...@btinternet.com>
Tue, 07 Feb 2012 00:17:32 +0000
On 06/02/12 19:12, Debashish Saha wrote:
> what is the basic difference between the commands> import pylab as *

Are you sure you don't mean

from pylab import *

???

The other form won't work because * is not a valid name in Python.
You should ghet a syntax error.

> import matplotlib.pyplot as plt

This is just an abbreviation to save typing matplotlib.pyplot
in front of every reference to the module names.

> import numpy as np

as above

> import numpy as *

again an error.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tut...@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Recent Messages in this Thread
Debashish Saha Feb 06, 2012 07:12 pm
Dave Angel Feb 06, 2012 07:26 pm
Alan Gauld Feb 07, 2012 12:17 am
Messages in this thread