Skip to content

Instantly share code, notes, and snippets.

@ssbb
Created November 15, 2014 13:05
Show Gist options
  • Save ssbb/f51af0badd29f76b7332 to your computer and use it in GitHub Desktop.
Save ssbb/f51af0badd29f76b7332 to your computer and use it in GitHub Desktop.
mapped_items = [{
'p_sum': i.get('price', None),
'p_dimensions': i.get('dimensions', []),
'p_weight': i.get('weight'),
'p_quantity': i.get('quantity'),
'p_valuable': i.get('valuable', False),
} for i in items]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment