This Is SO USEFUL!! #python #programming #coding

preview_player
Показать описание
This short video explain how to use comprehensive notation to build dictionaries in Python.

Background Music:
Creative Commons / Attribution 3.0 Unported License (CC BY 3.0)
Рекомендации по теме
Комментарии
Автор

“And you guessed it”
No. No, I did not.

PAltForMe
Автор

Every time I think I have a good grasp on “pythonic” ways to do things, I discover something new like this. Love it.

TheDoubleMvp
Автор

You can create:
set compressions {_ for _ in _}
dict comprehensions {_:_ for _ in _}
list comprehensions [_ for _ in _]
generator comprehensions (_ for _ in _)
And in generator comprehensions you can remove a pair of parentheses to have something like this: tuple(_ for _ in _)

norude
Автор

Imagine the surprise, when he learns about set comprehension and generator comprehension

rolandsz
Автор

This man is the master of lists. I can't say ive ever seen a video on any other topic

Deep_field
Автор

This is oddly relaxing to watch. I think this kind of educational content in what's missing.

snitox
Автор

Dude i saw this while implementing a long ass dictionary from a csv file and this video helped me do it so easily lol

jglez
Автор

It's interesting that you had no idea that dict comprehensions exist but still feel qualified to offer a master course on python

stonemannerie
Автор

Line 8, instead of list comprehension you can use map(len, names)

tsimafei_t
Автор

Comprehensions are seriously the only thing i like about Python, but i love them so much. They're one of the most plaintext self documenting features in any language.

PacificBird
Автор

I had a large coding project back in 2020, and that notation was key to my script working

cjlooklin
Автор

For somebody who’s begun learning Python, these videos are really helpful!

anthemproductions
Автор

As a developer who has majorly worked on Java pre 8 and post 8 and JS, learning Python was fun and eye opener especially version 3

pareeks
Автор

Dude, you make really nice coding videos. Your voice is smooth and the music makes it more interesting. Not some boring professor in monotone. Great job don't stop creating.

ex
Автор

I never knew I needed python shorts, but I do.

MrVohveli
Автор

There are also set and generator expressions! Python is awesome!

jackeown
Автор

You can do it with basic iterable objects (list, dict and set)

dany_fg
Автор

Wow that’s so helpful, i love the concept of list comprehension and was looking for something similar for dictionary, thanks a lot for sharing

OfficialMazLi
Автор

Which theme are you using? Great tip btw!

ismahelo
Автор

Comprehension is why I love Python, just a really clean way to map or filter or both to lists or dicts

Soppybobs