Skip to content

Instantly share code, notes, and snippets.

@jemoster
jemoster / inline_dictionary_list_comprehension.py
Last active April 8, 2017 18:30
Python dictionary in-line list comprehensions
import json
from typing import List
from uuid import uuid4
# Sample classes for building our data structure
class Inventory:
def __init__(self, name: str, express: bool=False):
self.name = name
self.express = express
self.id = str(uuid4())