В стандартном модуле random есть две очень похожие функции
random.randint()
random.randrange()
Обе возвращают случайное значение из указанного диапазона
>>> random.randint(10, 20)
12
>>> random.randrange(10, 20)
17
В чем же отличие?
Дело в том что у randrange() есть третий параметр step.
randint() действительно возвращает случайное число из указанного диапазона.
randrange() на первый взгляд делает тоже самое если передать также два параметра.
Но есть указать еще и step то наш диапазон усложняется, то есть в него попадёт не полный ряд значений.
Например, я хочу получить случайное значение из диапазона но только чётное число. Тогда достаточно сделать так:
>>> randrange(10, 20, 2)
16
Таким образом получается что randint это частный случай randrange без указания параметра step.
Еще одно важное отличие в том, что randint() включает в диапазон второе значение а randrange() нет. То есть выражение randrange(10, 20) никогда не вернёт 20, а randint(10, 20) вернёт.
#tricks#basic
📰Group Appearance Settings
Upgrading your group will unlock new features for the group:
- Color and Profile Logo
- Group Status Emoji
- Group Theme and Wallpaper
- Group Emoji Pack
#Boost | #Groups
👉The TG Times
📰Group Custom Emoji Pack
Group Admins can set a Custom Emoji Pack for the group.
All members can use emojis from this pack in the group, even without ⭐️ Premium subscription.
#Boost | #Groups
👉The TG Times
📰Boost to send messages in the group
Group admins can choose how many boosts a user must give to the group to bypass restrictions on sending messages.
#Boost | #Groups
👉The TG Times
📰Boosting Groups
Changes in the configuration of Telegram for macOS show that it will be possible to boost groups.
After upgrading groups, the ability to set the background for the group, choose the status emoji and choose the emoji pack for the group will be added.
It seems that just as in groups, the special sticker pack for that group can be set, it will also be possible to choose the emoji pack.
Thanks to @tgcrawl
#Boost | #Groups
👉The TG Times
📰Boosting Groups
Changes in the configuration of Telegram for macOS show that it will be possible to boost groups.
After upgrading grouos, the ability to set the background for the group, choose the status emoji and choose the emoji pack for the group will be added.
It seems that just as in groups, the special sticker pack for that group can be set, it will also be possible to choose the emoji pack.
Thanks to @tgcrawl
#Boost | #Groups
👉The TG Times
📰Boosting Groups
Changes in the configuration of Telegram for macOS show that it will be possible to boost groups.
After upgrading grouos, the ability to set the background for the group, choose the status emoji and choose the emoji pack for the group will be added.
It seems that just as in groups, the special sticker pack for that group can be set, it will also be possible to choose the emoji pack.
Thanks to @tgcrawl
#Boost | #Groups
👉The TG Times
@TheNexasMusic_bot
Qué puede hacer este bot?
Con este bot puedes reproducir música nn grupos de telegram a través del chat de voz!
Idioma: Inglés
(visto en @BotsGram_cu)
#groups, #music
@Gramaphone_voice_bot
Qué puede hacer este bot?
Con este bot puedes reproducir música nn grupos de telegram a través del chat de voz!
Idioma: Inglés
(visto en @BotsGram_cu)
#groups, #music
@MultiForwardBot
Qué puede hacer este bot?
Este bot reenvía mensajes y medios de tu canal a grupos ilimitados de telegram!
Idioma: Inglés, Italiano, Español
(visto en @BotsGram_cu)
#channel, #groups