Telegram Group & Telegram Channel
Функция reduce

Модуль functools позволяет хорошо раскрыть функциональные возможности Python. Например, в functools есть интересная функция reduce, которая позволяет «сжимать» данные, применяя последовательно функцию и запоминая результат.

Таким образом, в примере выше reduce умножает 1 на 2, затем результат этого умножения на 3 и так далее.

Подписывайтесь на канал 👉@pythonofff



tg-me.com/pythonofff/2929
Create:
Last Update:

Функция reduce

Модуль functools позволяет хорошо раскрыть функциональные возможности Python. Например, в functools есть интересная функция reduce, которая позволяет «сжимать» данные, применяя последовательно функцию и запоминая результат.

Таким образом, в примере выше reduce умножает 1 на 2, затем результат этого умножения на 3 и так далее.

Подписывайтесь на канал 👉@pythonofff

BY Python академия




Share with your friend now:
tg-me.com/pythonofff/2929

View MORE
Open in Telegram


Python академия Telegram | DID YOU KNOW?

Date: |

NEWS: Telegram supports Facetime video calls NOW!

Secure video calling is in high demand. As an alternative to Zoom, many people are using end-to-end encrypted apps such as WhatsApp, FaceTime or Signal to speak to friends and family face-to-face since coronavirus lockdowns started to take place across the world. There’s another option—secure communications app Telegram just added video calling to its feature set, available on both iOS and Android. The new feature is also super secure—like Signal and WhatsApp and unlike Zoom (yet), video calls will be end-to-end encrypted.

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”

Python академия from vn


Telegram Python академия
FROM USA