問題:
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