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

Реализация функции
all
эквивалентна этому:

def all(iterable):
for element in iterable:
if not element:
return False
return True

all([])
- True, потому что iterable пустой список и мы не заходим в цикл.

all([[]])
- False, потому что мы заходим в цикл и первый элемент iterable - пустой список, а
bool([]) = False

all([[[]]]) - True
, потому что первый элемент это уже не пустой список, а список в котором пустой список, т.е.
bool([[]]) = True



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

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

Реализация функции

all
эквивалентна этому:

def all(iterable):
for element in iterable:
if not element:
return False
return True

all([])
- True, потому что iterable пустой список и мы не заходим в цикл.

all([[]])
- False, потому что мы заходим в цикл и первый элемент iterable - пустой список, а
bool([]) = False

all([[[]]]) - True
, потому что первый элемент это уже не пустой список, а список в котором пустой список, т.е.
bool([[]]) = True

BY PyThrone




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

View MORE
Open in Telegram


PyThrone Telegram | DID YOU KNOW?

Date: |

Find Channels On Telegram?

Telegram is an aspiring new messaging app that’s taking the world by storm. The app is free, fast, and claims to be one of the safest messengers around. It allows people to connect easily, without any boundaries.You can use channels on Telegram, which are similar to Facebook pages. If you’re wondering how to find channels on Telegram, you’re in the right place. Keep reading and you’ll find out how. Also, you’ll learn more about channels, creating channels yourself, and the difference between private and public Telegram channels.

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

PyThrone from jp


Telegram PyThrone
FROM USA