Multiple returns from a python function

Discussion in 'Python' started by Preetip, Aug 10, 2012.

  1. Preetip


    Aug 10, 2012
    Likes Received:
    How do I handle a Python function that returns multiple lists

    Python script:
    a = [ 'a','b','abc']
    b = [ 1 , 2 , 3]
    return (a,b)

    In the c function calling the above python function:

    pValue,pValue1 = PyObject_CallObject(pFunc, pArgs);

    But then I cannot use the objects to extract the list values.
    What am I doing wrong ?
    Preetip, Aug 10, 2012
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.