Telegram Group & Telegram Channel
Что не так с приведённым кодом?

В Python переменные не объявляются заранее, поэтому интерпретатор самостоятельно определяет их область видимости. Если внутри функции используется переменная, она считается локальной. В данном случае переменная count является глобальной, что приводит к возникновению ошибки в коде.


Библиотека собеса по Python



tg-me.com/py_interview_lib/891
Create:
Last Update:

Что не так с приведённым кодом?

В Python переменные не объявляются заранее, поэтому интерпретатор самостоятельно определяет их область видимости. Если внутри функции используется переменная, она считается локальной. В данном случае переменная count является глобальной, что приводит к возникновению ошибки в коде.


Библиотека собеса по Python

BY Библиотека собеса по Python | вопросы с собеседований




Share with your friend now:
tg-me.com/py_interview_lib/891

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.

Launched in 2013, Telegram allows users to broadcast messages to a following via “channels”, or create public and private groups that are simple for others to access. Users can also send and receive large data files, including text and zip files, directly via the app.The platform said it has more than 500m active users, and topped 1bn downloads in August, according to data from SensorTower.telegram from es


Telegram Библиотека собеса по Python | вопросы с собеседований
FROM USA