How to call a function with two arguments in python

后端 未结 3 1602
名媛妹妹
名媛妹妹 2021-01-29 15:48

i wanna ask about how to call a function with two arguments in python. for example,
code below is an example i want to call color function.

def color(objec         


        
3条回答
  •  悲&欢浪女
    2021-01-29 16:32

    The red variable is defined inside of color, so you can't use it outside of color.

    Instead, you have the variables tes and tes_2 defined, so the call to color should look like print color(tes, tes_2).

提交回复
热议问题