I want to know if there is any difference between:
import maya.cmds as cmds
cmds.polyCube()
and
from maya import cmds
cmds.polyCube()
In the current context there's no difference between import maya.cmds as cmds
and from maya import cmds
. Look at this SO post dated 2009 to know about possible pros and cons.