PYTHON_SOLVES Telegram 49
## Аргументы по умолчанию

Тема:
Как задавать значения, если их не передали.

def greet(name="гость"):
print("Привет,", name)

greet() # Привет, гость
greet("Андрей") # Привет, Андрей


Полезные советы:

* Аргументы по умолчанию упрощают код, особенно в утилитах и чат-ботах.
* Значения по умолчанию задаются справа налево.

#азы



tgoop.com/python_solves/49
Create:
Last Update:

## Аргументы по умолчанию

Тема:
Как задавать значения, если их не передали.

def greet(name="гость"):
print("Привет,", name)

greet() # Привет, гость
greet("Андрей") # Привет, Андрей


Полезные советы:

* Аргументы по умолчанию упрощают код, особенно в утилитах и чат-ботах.
* Значения по умолчанию задаются справа налево.

#азы

BY Python решает 🐍


Share with your friend now:
tgoop.com/python_solves/49

View MORE
Open in Telegram


Telegram News

Date: |

In 2018, Telegram’s audience reached 200 million people, with 500,000 new users joining the messenger every day. It was launched for iOS on 14 August 2013 and Android on 20 October 2013. A Telegram channel is used for various purposes, from sharing helpful content to implementing a business strategy. In addition, you can use your channel to build and improve your company image, boost your sales, make profits, enhance customer loyalty, and more. Image: Telegram. How to Create a Private or Public Channel on Telegram? Developing social channels based on exchanging a single message isn’t exactly new, of course. Back in 2014, the “Yo” app was launched with the sole purpose of enabling users to send each other the greeting “Yo.”
from us


Telegram Python решает 🐍
FROM American