BOOKPYTHON Telegram 3167
Моржовый оператор (Walrus Operator)

Моржовый оператор (Walrus operator) — это оператор :=, введенный в версии 3.8. Он позволяет одновременно присвоить значение переменной и вернуть его.

Синтаксис выглядит так: имя_переменной := выражение. Справа вычисляется выражение и присваивается переменной слева
Переменная доступна в остальной части выражения после оператора.

Это удобно при работе с выражениями со сложными вложенными операциями. Позволяет избежать повторного вычисления.

👉@BookPython
👍71



tgoop.com/BookPython/3167
Create:
Last Update:

Моржовый оператор (Walrus Operator)

Моржовый оператор (Walrus operator) — это оператор :=, введенный в версии 3.8. Он позволяет одновременно присвоить значение переменной и вернуть его.

Синтаксис выглядит так: имя_переменной := выражение. Справа вычисляется выражение и присваивается переменной слева
Переменная доступна в остальной части выражения после оператора.

Это удобно при работе с выражениями со сложными вложенными операциями. Позволяет избежать повторного вычисления.

👉@BookPython

BY Библиотека Python разработчика | Книги по питону




Share with your friend now:
tgoop.com/BookPython/3167

View MORE
Open in Telegram


Telegram News

Date: |

To upload a logo, click the Menu icon and select “Manage Channel.” In a new window, hit the Camera icon. The initiatives announced by Perekopsky include monitoring the content in groups. According to the executive, posts identified as lacking context or as containing false information will be flagged as a potential source of disinformation. The content is then forwarded to Telegram's fact-checking channels for analysis and subsequent publication of verified information. Members can post their voice notes of themselves screaming. Interestingly, the group doesn’t allow to post anything else which might lead to an instant ban. As of now, there are more than 330 members in the group. As of Thursday, the SUCK Channel had 34,146 subscribers, with only one message dated August 28, 2020. It was an announcement stating that police had removed all posts on the channel because its content “contravenes the laws of Hong Kong.” The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously.
from us


Telegram Библиотека Python разработчика | Книги по питону
FROM American