在python中如何把字节换算成兆字节?(让程序自己单位换算)

如题所述

第1个回答  2024-01-09
def bytes_to_megabytes(bytes):
megabytes = bytes / (1024.0 * 1024.0)
return megabytes
第2个回答  2024-01-14
print(int(input())/1024**2)
/1024 /1024
Bytes ====> KB ====> MB
/1024**2
相似回答