В стандартном модуле 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
goldendict-ng
下一代 GoldenDict。一款功能丰富的开源词典查找程序,支持多种词典格式和在线词典。
https://xiaoyifang.github.io/goldendict-ng/
https://forum.freemdict.com/
https://github.com/lrorpilla/jidoujisho
Japanese-Chinese dictionaries.
https://cloud.freemdict.com/index.php/s/pgKcDcbSDTCzXCs?path=%2FJAPANESE%2FJpn-Chi
recommend using that add-on for anki:
https://ankiweb.net/shared/info/1344485230
the complete guide of how to configure goldendict-ng for Japanese :
https://tatsumoto-ren.github.io/blog/setting-up-goldendict.html
create anki cards from anime
https://github.com/Ajatt-Tools/mpvacious
#dict
https://github.com/blissnd/easyxls
Convert any #spreadsheet into a Python internal #dict/#array data structure, for easy processing. Can also handle pivot tables.
For pivot table usage, header_row_start & header_col_start need to be set equal to the top left corner of the pivot table => header_row_start=8, header_col_start='c' in the included example.
Column IDs must always be lowercase chars in quotes, e.g. 'a'.
👑New Meme Contest
👑
💰Reward : 100 USDT For Top 10 People🤑
👑Contest Link : Meme Contest
⭐Steps to take Part
⭐ Follow @dict00
⭐ Like RT Quite this tweet+comments @ 3 friends
⭐ Add your #DICT meme to the comments below
⭐ Must join Telegram Channel
⭐ Send proof in Telegram group with retweet link
#MemeContest#100USDT#USDT#giveaway
🔔Note: Please do your own research (DYOR) before joining to any project.Don't send any fee or penny without doing own research
✈️Business:@ProjectPromoters✅
@lingvanexbot
Qué puede hacer este bot?
Este es un bot traductor de alta calidad basada en redes neuronales para más de 50 idiomas.
➕ Traducir cualquier texto o palabras
➕ Convertir texto a voz
➕ Dar definiciones para cualquier palabra
➕ Diccionario
➕ Buscar por ejemplos de traducciones
Idioma: Múltiple
(visto en @BotsGram_cu)
#linguistic, #translate, #define, #dictionary, #dict, #text2speech, #speech, #examples, #sentence, #words