I'm starting exploring python in maya (pymel) and I have a problem with getting right type of selected object.
In outliner I have selected camera but when I'm executing code below it's returning type "transform". How to get right type ("camera")?
from pymel.core import *
selection = ls(sl=True)
print(selection[0].nodeType())