问题:
What is the meaning of _
after for
in this code? 这段代码中_
after for
的含义是什么? this
if tbh.bag: n = 0 for _ in tbh.bag.atom_set(): n += 1
解决方案:
参考一: https://stackoom.com/question/Oj51/Python中单个下划线-变量的用途是什么参考二: https://oldbug.net/q/Oj51/What-is-the-purpose-of-the-single-underscore-variable-in-Python