Python get rid of bytes b' '

后端 未结 6 1425
悲&欢浪女
悲&欢浪女 2021-02-18 17:24
import save

string = \"\"

with open(\"image.jpg\", \"rb\") as f:
    byte = f.read(1)
    while byte != b\"\":
        byte = f.read(1)
        print ((byte))
<         


        
6条回答
  •  独厮守ぢ
    2021-02-18 17:39

    The b"..." is just a python notation of byte strings, it's not really there, it only gets printed. Does it cause some real problems to you?

提交回复
热议问题