Python 传递元组参数

2022年12月30日13:25:31

比如元组定义如下:

# Color (r,g,b,alpha)
Black = (0,     0,      0,      255)

当元组作为参数传递时,需要在名称前加“*”

hp_render.set_color(*Red)

  • 作者:Bungehurst
  • 原文链接:https://lun55423.blog.csdn.net/article/details/111937350
    更新时间:2022年12月30日13:25:31 ,共 91 字。