{"url":"https://python-remrin.hatenadiary.jp/entry/2017/05/23/130843","height":"190","type":"rich","title":"bytes, bytearray","description":"\u30b0\u30b0\u3063\u3066\u307f\u308b\u3068\u3001\u6587\u5b57\u5217\u306b\u95a2\u3059\u308b\u578b\u3068\u3044\u3046\u3088\u308a\u306f\u3001\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u6271\u3046\u578b\u3067\u3057\u305f\u3002 \u307e\u3068\u3081\u3066\u30d0\u30a4\u30ca\u30ea\u30b7\u30fc\u30b1\u30f3\u30b9\u3068\u3082\u547c\u3070\u308c\u307e\u3059\u3002 0\uff5e255\u306e\u6574\u6570\u306e\u307f\u304c\u8981\u7d20\u306b\u306a\u308a\u307e\u3059\u3002 bytes \u30a4\u30df\u30e5\u30fc\u30bf\u30d6\u30eb\uff08\u5024\u306e\u5909\u66f4\u4e0d\u53ef\uff09 bytearray \u30df\u30e5\u30fc\u30bf\u30d6\u30eb\uff08\u5024\u306e\u5909\u66f4\u53ef\u80fd\uff09 bytes\u578b \u30fbbytes\u578b\u306e\u751f\u6210 \u30ea\u30c6\u30e9\u30eb b\"...\" bytes()\u95a2\u6570 \u6587\u5b57\u5217.encode()\u30e1\u30bd\u30c3\u30c9 b1 = b\"abc\" print(b1) # b'abc' print(type(b1)) # <class 'bytes'> b2= bytes(\"def\", encoding=\"shift_jis\") print(b2) #\u2026","version":"1.0","author_url":"https://blog.hatena.ne.jp/rare_Remrin/","blog_url":"https://python-remrin.hatenadiary.jp/","author_name":"rare_Remrin","provider_url":"https://hatena.blog","image_url":null,"provider_name":"Hatena Blog","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpython-remrin.hatenadiary.jp%2Fentry%2F2017%2F05%2F23%2F130843\" title=\"bytes, bytearray - Remrin\u306epython\u653b\u7565\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2017-05-23 13:08:43","blog_title":"Remrin\u306epython\u653b\u7565\u65e5\u8a18","categories":["python"]}