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

TGINSIGHT SIMILAR POSTS

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

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

Тип строки в Python имеет очень много удобных методов. Сегодня пост про два таких метода которые чаще всего используются "однобоко". Это методы startswith() и endswith() Самый обычный сценарий использования — проверка, начинается ли строка с указанной подстроки? >>> "some_string".startswith("some") True И аналогичная ситуация с зеркальным вариантом этой функции, проверка совпадения с конца >>> "some_string".endswith("some") False Так они используются в большинстве случаев что я видел. Но у этих функций есть еще два варианта использования. 🔸Сравнение нескольких подстрок Для проверки нескольких подстрок в одной строке обычно вызывают эти функции несколько раз. Но на самом деле достаточно передать кортеж со всеми строками один раз. Если будет хоть одно совпадение то функция вернёт True. >>>"my_image.png".endswith(("jpg", "png", "exr")) True 🔸Диапазон поиска Вторым аргументом можно передать индекс символа с которого следует начать сравнение, а третий аргумент это индекс последнего символа. >>> ".filename.ext".startswith("file", 1) True >>> "file_###.ext".endswith('#', 0, -4) True Индексы можно указать отрицательными, что означает отсчёт с конца. #trics#basic

Hashtags

Резултати

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

Пребарај: #gltf

当前筛选 #gltf清除筛选
GitHub Trends

@githubtrending · Post #15296 · 12.11.2025 г., 13:30

#javascript#3d_gaussian_splatting#game_development#game_engine#gamedev#gaussian_splatting#gltf#hacktoberfest#javascript#nodejs#playcanvas#typescript#virtual_reality#webgl#webgl2#webgpu#webxr PlayCanvas is an open-source game engine that lets you create 3D and 2D games or apps that run in any browser, using WebGL and WebGPU for fast, high-quality graphics. It supports advanced features like animation, physics, sound, and asset streaming, and you can write code in JavaScript or TypeScript. The engine is free, easy to set up, and works well for both simple projects and complex games, making it simple to build and share interactive content online. https://github.com/playcanvas/engine

GitHub Trends

@githubtrending · Post #14774 · 01.06.2025 г., 12:00

#cplusplus#3mf#android#asset_pipeline#assets#assimp#c_plus_plus#collada#dae#fbx#fbx_exporter#game_development#gamedev_tool#gamedevelopment#gltf#gltf2#ifc#patreon#python#stl The Open Asset Import Library (Assimp) is a tool that helps load many different 3D file formats into a common format. It supports over 40 formats for importing and several for exporting. Assimp works on various platforms like Windows, macOS, Linux, Android, and iOS. It also provides tools to improve the 3D models, such as fixing errors and making them look better. This library is useful for developers because it simplifies working with different 3D file types, making it easier to create and manage 3D content across different systems. https://github.com/assimp/assimp