Telegram Group & Telegram Channel
Что выведет этот код?

В python циклы использует тот же scope (область видимости), в которой они объявлены и оставляют переменную после себя.

Почему не 0 и не 7?

Не 7, потому что range(stop) не включая stop, т.е. дойдет до 7-1 = 6.
Не 0, потому что цикл полностью отработал, т.е. дошел до 6.

Поэтому ответ 6.

#forloop



tg-me.com/pythrone/4
Create:
Last Update:

Что выведет этот код?

В python циклы использует тот же scope (область видимости), в которой они объявлены и оставляют переменную после себя.

Почему не 0 и не 7?

Не 7, потому что range(stop) не включая stop, т.е. дойдет до 7-1 = 6.
Не 0, потому что цикл полностью отработал, т.е. дошел до 6.

Поэтому ответ 6.

#forloop

BY PyThrone




Share with your friend now:
tg-me.com/pythrone/4

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

telegram from tw


Telegram PyThrone
FROM USA