Most Python coders don't know this! - Python Tip #python #coding #pythontutorial

preview_player
Показать описание
In this Python tip I'll show you what the pipe operator does in Python 3.9+ when you use it on two dictionaries. In this example, I'm using two dictionaries of actors and the heroes they played on screen.
Рекомендации по теме
Комментарии
Автор

That is no pipe, that is a OR combination of two data Maps. Just math...

erikoffenbach
Автор

Gg ik that I've learned coding
So when you do a = and then a bracket for example dinosaur = }
"Small dinosaur"
And then print ("dinosaur ") it prints out Small dinosaur
Get it? It writes that but if it was with the dinosaur|egg for example it prints both

Imsoboredthatyes
Автор

And also key value pair, and ben key in marvel > value to ben in dc so python take dc ben then tom other .

Satyam-N
Автор

So exactly what you would expect? I'm confused what the point is?

SR-tijj