I\'m having problems with Python\'s import random function. It seems that import random and from random import random are importing different thing
The 'random' module is a package from the python standard library, as well as a function defined in this package.
Using 'import random' imports the package, which you can then use the function from this package: 'random.random()'. You can use any other function from the 'random' package as well.
You can also tell python to specifically import only the random function from the package random: 'from random import random'. Then you can only use the function 'random()', and should not specify the package it comes from. However you cannot use any other function from the random package, because they have not been imported if you use 'from random import random'.