How to determine 'word' size in Python

后端 未结 6 412
再見小時候
再見小時候 2021-01-20 00:03

I need to know the number of bytes in a \'word\' in Python. The reason I need this is I have the number of words I need to read from a file; if I knew the number of bytes in

6条回答
  •  迷失自我
    2021-01-20 00:26

    There is no concept of 'word' in Python, when you read binary data from a file, you can state explicitly, how many bytes should be read at a time.

    In terms of compiler and/or platform, 'WORD' generally determines a size of a basic data unit. And Python is independent from that kind of stuff :)

提交回复
热议问题