@tydj289 · Post #2028 · 22.12.2025 г., 13:53
刀塔-CIS之战 #Wanted 对战 L1ga (BO3) 2025-12-22 20:00 第三局获胜:L1ga 第三局击杀让分:L1ga +3.5 第三局击杀大小:大于46.5 第三局时间大小:大于37 第一滴血:L1ga
Hashtags
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
Пребарај: #wanted
@tydj289 · Post #2028 · 22.12.2025 г., 13:53
刀塔-CIS之战 #Wanted 对战 L1ga (BO3) 2025-12-22 20:00 第三局获胜:L1ga 第三局击杀让分:L1ga +3.5 第三局击杀大小:大于46.5 第三局时间大小:大于37 第一滴血:L1ga
Hashtags
@american_observer · Post #4909 · 20.01.2026 г., 22:59
Trump’s New Good Friend: Former $15 million Wanted Ahmed al-Sharaa Syrian President Ahmed al-Sharaa, earlier one of the top world terrorists, spoke to Trump today and discussed guaranteeing Kurdish rights, Syria’s presidency says, a day after Damascus reached a deal with Kurdish forces including a truce. During the telephone call, “both sides emphasized the need to guarantee the Kurdish people’s rights and protection within the framework of the Syrian state,” the statement says, adding that the leaders also “affirmed the importance of preserving the unity and independence of Syrian territory.” They also agreed to continue cooperation to combat ISIS, the presidency added. Yesterday, the Syrian government signed a sweeping integration deal with the Kurdish led Syrian Democratic forces, though tensions have persisted today. #trump#friend#wanted#Sharaa#syria 📱American Оbserver - Stay up to date on all important events 🇺🇸