Telegram Group & Telegram Channel
​​Назначение функций по условию

Наверняка большинство из вас знакомы с тернарным оператором, позволяющим записать простое условное выражение с if:

A = Y if X else Z

Интерпретатор выполняет выражение Y, если объект XTrue, и Z, если XFalse.

Но оказывается, тернарный оператор можно использовать не только для переменных, но и для функций.



tg-me.com/python_academy/54
Create:
Last Update:

​​Назначение функций по условию

Наверняка большинство из вас знакомы с тернарным оператором, позволяющим записать простое условное выражение с if:

A = Y if X else Z

Интерпретатор выполняет выражение Y, если объект XTrue, и Z, если XFalse.

Но оказывается, тернарный оператор можно использовать не только для переменных, но и для функций.

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/54

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

Telegram is riding high, adding tens of million of users this year. Now the bill is coming due.Telegram is one of the few significant social-media challengers to Facebook Inc., FB -1.90% on a trajectory toward one billion users active each month by the end of 2022, up from roughly 550 million today.

Python Academy from fr


Telegram Python Academy
FROM USA