Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Double up a list for Houdini menu parameter scripts
items = ["raspberry", "grape"]
return [x for y in [(x, x) for x in items] for x in y]
# ["raspberry", "raspberry", "grape", "grape"]
# Or fancier
[x for y in [(x, x.title()) for x in presets] for x in y]
# ["raspberry", "Raspberry", "grape", "Grape"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment