osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help to understand the data structure


Hi All,

Please ignore it, I was able to figure out it.

for dev in devlist:
    print (dev.name, dev.id)



--
Thanks & Regards
Mohan L




On Fri, Sep 27, 2019 at 8:41 PM Mohan L <l.mohanphy at gmail.com> wrote:

> Hi All,
>
> I am using get_devices_list method from this module:
> https://github.com/Tufin/pytos/blob/master/pytos/securetrack/helpers.py.
> Here is my two like code and output looks like:
> https://pastebin.com/K9KBeqYL
>
>
> I am not able to manage to further loop the data to print below output:
>
>
> devicename1 10
>
> devicename2 11
>
> devicename3 12
>
>
> I spend quit some time still not able to figure out how to parse. Can some
> one through some light on how to phrase it.
>
>
> --
> Thanks & Regards
> Mohan L
>
>
>