📅  最后修改于: 2022-03-11 14:45:55.265000             🧑  作者: Mango
def human_size(bytes, units=[' bytes','KB','MB','GB','TB', 'PB', 'EB']):
return str(bytes) + units[0] if bytes < 1024 else human_size(bytes>>10, units[1:])