Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这在 C# 中看起来如何?
checksum = hashlib.sha256(hashlib.sha256(address).digest()).digest()[:4]
尤其是最后一部分 [:4] 是什么意思?
那是一片。它从 0 到 4(含)获取列表中的每个位置。
>>> [1,2,3,4,5,6,7,8][:4] [1, 2, 3, 4]