Skip to content

Instantly share code, notes, and snippets.

@jamesrobinsonvfx
Last active January 25, 2022 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesrobinsonvfx/226a72a591e7663ea1fade594c1e13a4 to your computer and use it in GitHub Desktop.
Save jamesrobinsonvfx/226a72a591e7663ea1fade594c1e13a4 to your computer and use it in GitHub Desktop.
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