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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #242 · 7 мај

Теперь запакуем строку. В этом случае следует передавать тип данных bytes. >>> struct.pack('=s', b'a') b'a' Для записи слова следует указывать количество символов. >>> struct.pack('=5s', b'hello') b'hello' Кстати, запакованный вид соответствует исходному тексту. Всё верно, символ есть в таблице ASCII, то есть его код попадает в диапазон 0-127, он может быть записан одним байтом и имеет визуальное представление. А вот что будет если добавить символ вне ASCII >>> struct.pack(f'=s', b'ё') SyntaxError: bytes can only contain ASCII literal characters. Ошибка возникла еще на этапе создания объекта bytes, который не может содержать такой символ. Поэтому надо кодировать эти байты из строки. >>> enc = 'ёжик'.encode('utf-8') >>> struct.pack(f'={len(enc)}s', enc) b'\xd1\x91\xd0\xb6\xd0\xb8\xd0\xba' Заметьте, длина такой строки в байтах отличается от исходной длины, так как символы вне ASCII записываются двумя байтами и более. Поэтому здесь формат создаём на лету, используя получившуюся длину как каунтер токена. #libs#basic

Hashtags

Резултати

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

Пребарај: #mainnetlaunch

当前筛选 #mainnetlaunch清除筛选
Airdrop Comic

@airdropcomic · Post #2084 · 31.07.2025 г., 08:09

🔥Atleta Quest – Mainnet Journey✅ 💠Reward: A massive 2,000 $USDTprize pool is up for grabs earn your share by completing simple tasks and climbing the leaderboard ☀️ Join Now:https://quest.intract.io/quest/68872f19269c3bcf29d1a29a ⚙️ How to Participate? ♦️Complete simple on-chain & off-chain tasks ♦️Earn points by finishing quests ♦️Climb the leaderboard ♦️Claim your share of rewards 📌About Atleta Network: Join the Sports x Tech revolution Atleta is building a dynamic ecosystem with real-world utility and this quest is your ticket in. 🚀 🧠This is the next step toward their Mainnet launch and the competition is heating up 📖 Source: https://x.com/Atleta_Network/status/1949817380080595369 ® Note:This campaign is 100% free. No fee required. Please DYOR before participating. #AtletaNetwork#CryptoQuest#Web3Gaming#MainnetLaunch#USDTRewards

Crypto M - Crypto News

@CryptoM · Post #64672 · 09.04.2026 г., 13:25

🚀 Circle's Arc Blockchain Opens Testnet Code Ahead of Mainnet Launch Circle's Arc blockchain has announced the release of its testnet code ahead of its mainnet launch. According to Foresight News, developers can now initiate testnet nodes and review the source code. Additionally, a bug bounty program has been launched on the HackerOne platform to enhance security measures. #CircleArcBlockchain#TestnetLaunch#MainnetLaunch#BlockchainDevelopment#BugBounty#HackerOne#SecurityMeasures#CryptoDevelopment