Wednesday, August 3, 2022

How do I extract individual values from pmt list and dict

Hello GNURadio Community, 

Let's assume the following pmt definitions for a list and and dictionary in an OOT block: 
P_list = pmt.to_pmt([1, 2, 3.45, 'eggs'])
P_dict = pmt.to_pmt({'spam': 20, 'eggs': 40})

How do I explicitly extract the first element in P_list and the value for 'spam' from P_dict?

Thank you!

George

No comments:

Post a Comment