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.
这个问题可能有点尴尬,但我不想使用未使用的变量。例如:
height, width = my_function()
我只想使用宽度值,有一种方法可以只分配width值,例如:
width
, width = my_function()
如果你只想分配width,你可以简单地做width = my_function()[1]
width = my_function()[1]