PYTHONPORTAL Telegram 4161
4 ошибки в коде на Python, которые замедляют вашу работу

🍩Неэффективные структуры данных

Использование списков (list) вместо множеств (set) или словарей (dict) для операций поиска (O(n) вместо O(1))

🍩Лишние вызовы функций

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

🍩Глобальные переменные

Чрезмерное использование глобальных переменных замедляет доступ к данным. Лучше передавать параметры явно.

🍩Самописные решения

Написание собственных реализаций (сортировка, поиск и т.д.) вместо использования оптимизированных встроенных функций (sorted(), sum(), collections и др.)

👉 @PythonPortal
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3210🔥5



tgoop.com/PythonPortal/4161
Create:
Last Update:

4 ошибки в коде на Python, которые замедляют вашу работу

🍩Неэффективные структуры данных

Использование списков (list) вместо множеств (set) или словарей (dict) для операций поиска (O(n) вместо O(1))

🍩Лишние вызовы функций

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

🍩Глобальные переменные

Чрезмерное использование глобальных переменных замедляет доступ к данным. Лучше передавать параметры явно.

🍩Самописные решения

Написание собственных реализаций (сортировка, поиск и т.д.) вместо использования оптимизированных встроенных функций (sorted(), sum(), collections и др.)

👉 @PythonPortal

BY Python Portal







Share with your friend now:
tgoop.com/PythonPortal/4161

View MORE
Open in Telegram


Telegram News

Date: |

Telegram users themselves will be able to flag and report potentially false content. It’s easy to create a Telegram channel via desktop app or mobile app (for Android and iOS): The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added. Joined by Telegram's representative in Brazil, Alan Campos, Perekopsky noted the platform was unable to cater to some of the TSE requests due to the company's operational setup. But Perekopsky added that these requests could be studied for future implementation. 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.
from us


Telegram Python Portal
FROM American