TypeError: 'str' does not support the buffer interface

后端 未结 7 932
南方客
南方客 2020-11-22 03:11
plaintext = input(\"Please enter the text you want to compress\")
filename = input(\"Please enter the desired filename\")
         


        
7条回答
  •  野性不改
    2020-11-22 04:03

    >>> s = bytes("s","utf-8")
    >>> print(s)
    b's'
    >>> s = s.decode("utf-8")
    >>> print(s)
    s
    

    Well if useful for you in case removing annoying 'b' character.If anyone got better idea please suggest me or feel free to edit me anytime in here.I'm just newbie

提交回复
热议问题