Ask Your Question

How to take multiple outputs of a command and use them one by one later

asked 2014-10-17 07:09:55 +0200

algebraicallyclosed gravatar image


This is what I am trying to achieve while using Sage worksheet interface.

Assume that I wrote a code and it gave, for example, for each i in a range of lists, list[0]. (First element of each list) So I have multiple outputs. Now I want to use these outputs, I want the system to consider them as a list, and take iterative combinations of elements of it. Can I do that, and how?

edit retag flag offensive close merge delete



hello, could you describe more precisely what you want to do? Or even better, put a simple version of your code of the first function...

vdelecroix gravatar imagevdelecroix ( 2014-10-17 16:44:23 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-18 12:49:06 +0200

calc314 gravatar image

I usually do this using a for loop. For example,

# overly simple example function
for entry in L:
    #your code to run here
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-10-17 07:09:55 +0200

Seen: 225 times

Last updated: Oct 18 '14