Теперь запакуем строку.
В этом случае следует передавать тип данных 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
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 165 622.4 as of 18.11.2022.
The aggregate volume of state owned share in 225 JSCs totaled UZS 133 689.2 billion, i.e. 80.7 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 165 616.4 as of 11.11.2022.
The aggregate volume of state owned share in 225 JSCs totaled UZS 133 690.1 billion, i.e. 80.7 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 630 and the aggregate volume of shares issues totaled UZS 165 616.2 as of 04.11.2022.
The aggregate volume of state owned share in 225 JSCs totaled UZS 133 690.3 billion, i.e. 80.7 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 165 616.2 as of 28.10.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 133 687.6 billion, i.e. 80.7 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 164 689.5 as of 21.10.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 133 687.6 billion, i.e. 81.2 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 164 619.5 as of 14.10.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 133 677.9 billion, i.e. 81.2 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 164 609.8 as of 07.10.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 133 677.9 billion, i.e. 81.2 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 164 597.6 as of 30.09.2022.
The aggregate volume of state owned share in 225 JSCs totaled UZS 133 665.7 billion, i.e. 81.2 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 164 397.9 as of 23.09.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 133 348.9 billion, i.e. 81.1 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 163 200.5 as of 16.09.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 132 889.5 billion, i.e. 81.4 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 631 and the aggregate volume of shares issues totaled UZS 163 200.4 as of 09.09.2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 132 895.8 billion, i.e. 81.4 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube
DEPO - #STATISTICS
CHANGES IN STRUCTURE OF SHAREHOLDERS
The number of JSCs totaled 630 and the aggregate volume of shares issues totaled UZS 163 190.4 as of 26 August 2022.
The aggregate volume of state owned share in 226 JSCs totaled UZS 132 895.8 billion, i.e. 81.4 %.
#structure#shareholders#share#infographics#statistics#changes
deponet.uz|Tg|Fb|Inst|Youtube