DEV Community

Discussion on: Python for JavaScript Developers

 
tomleo profile image
Tom Leo

You can drop the parenthesis i.e. for k, v in thing.items(). You only need parenthesis for comprehension i.e. {k: v for (k,v) in thing.items()} or [(k,v) for (k,v) in thing.items()]