Skip to content

List comprehension-like workflow? #654

Answered by Goju-Ryu
mihirmanna asked this question in Q&A
Discussion options

You must be logged in to vote

You can't easily do this with three lists, but if you make one list of structs each containing one mass, height and diameter, then you can use the map function to apply a function on each element.

If you need I can provide a simple example implementation of this later when I have a little more time.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mihirmanna
Comment options

@Goju-Ryu
Comment options

Answer selected by mihirmanna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants