instead of

Code: Select all

`import math`

...

math.sqrt(5.0)

you can also import a set of functions that are inside math and then drop the "math." prepending

Code: Select all

`from math import sqrt, exp, log, pow`

...

sqrt(5.0)

you can also import all functions that are inside math

Code: Select all

`from math import *`

...

sqrt(5.0)

I would do the middle version. The first is indeed too verbose. The last imports lots of stuff, and maybe it import some "bs" function who's name clashes with a function you made yourself. With the middle one you'll have an explicit list of functions you've imported from math.