let

Is there a Python equivalent of the Haskell 'let'

Is there a Python equivalent of the Haskell 'let' Question: Is there a Python equivalent of the Haskell ‘let’ expression that would allow me to write something like: list2 = [let (name,size)=lookup(productId) in (barcode(productId),metric(size)) for productId in list] If not, what would be the most readable alternative? Added for clarification of the let syntax: x …

Total answers: 10