как поставить условия используя несколько функций

как поставить условия используя функцию? к примеру:

def game():
     print("что-то")
def amega():
    print("что-то")
def alf():
    print("что-то")

if game and amega :  #здесь основной вопрос, я хочу поставить условие,если вызывается эта функция и эта #функция то ...
   print("что-то")"""
elif game and alf:
    print("что-то")
elif amega and alf:
    print("что-то")
#
def c1(event):
    c.create_image(167, 168, image=img_cross)
    return True
def c2(event):
    c.create_image(500, 168, image=img_cross)
    return True
def c3(event):
    c.create_image(833, 168, image=img_cross)
    return True                                                                                                                  
 if c1(event="<Button-1>") == True and c2(event="<Button-1>") == True:
    print("р")
elif c2(event="<Button-1>")== True and c3(event="<Button-1>")== True :
    print("К")
b1 = False
b2 = False
b3 = False                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
a1 = False
a2 = False
a3 = False                                                                                                                                              
def c1(event):
    global a1
    c.create_image(167, 168, image=img_cross)
    a1 = True
    ll()
def c2(event):
    global a2
    c.create_image(500, 168, image=img_cross)
    a2 = True
    ll()
def c3(event):
    global a3
    c.create_image(833, 168, image=img_cross)
    a3 = True                                                                                  
    ll()                                                                                                                                                            
def ll():
    if a1 == True and a2 == True and a3 == True:
        print("к")

    elif b1 == True and b2 == True and b3 == True:
        print("н")

Как-то так? Устно: если выполняются определенные функции , то выполняется определенное действие


Ответы (1 шт):

Автор решения: Shailum
def a():
    return True

def b():
    return False

def c():
    return True


resA,resB,resC = a(), b(), c()

if resA and resB:
    print("resA and resB")
    ......
→ Ссылка