TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #273 · 26 јул.

В стандартном модуле 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

Резултати

Пронајдени 2 слични објави

Пребарај: #libraries

当前筛选 #libraries清除筛选
djangoproject

@djangoproject · Post #328 · 03.05.2017 г., 19:27

http://www.csestack.org/python-list-installed-modules-versions-pip/ The main strength of the Python is, the wide range of external #libraries are available. As we keep coding in Python, we install many packages. It is easy getting a Python list installed #modules on the system. There are a couple of ways you can do that.

GitHub Trends

@githubtrending · Post #14966 · 16.07.2025 г., 13:30

#other#awesome#awesome_list#c#c_plus_plus#cpp#cpp_library#cppcon#libraries#list#lists#programming_tutorial#resources You can access a vast, well-organized collection of C++ libraries, frameworks, and tools that cover almost every programming need—from standard libraries, GUI, networking, and machine learning to game engines, cryptography, and more. This curated list includes popular and high-quality options like Boost, Qt, OpenCV, and many specialized libraries for tasks such as asynchronous programming, audio processing, and serialization. Using these resources can save you time, improve code quality, and help you build efficient, robust applications by leveraging tested, peer-reviewed components instead of writing everything from scratch. It’s a one-stop reference to boost your C++ development productivity and capabilities. https://github.com/fffaraz/awesome-cpp