Skip to content

Instantly share code, notes, and snippets.

@jamesrobinsonvfx
Last active January 25, 2022 11:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
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