I want to write a program to give some number for user then if sum of 3 number in list == 0 prit yes: part of my code:
import os
from typing import Mapping
from colorama import Fore , init
init()
os.system("cls" or "clear")
clear = lambda: os.system('cls')
# GIVE LIST NUMBER
listed = input(Fore.GREEN+"Please Enter A List Of Number: ")
# CONVERT INPUT(STR) TO LIST:
listed = list(map(int, listed.split(',')))
listed= list(map(int, listed))
#CHEACK SUM IN LIST == 0
I don't know how check my IF to Print yes or no.....
Example:
list = [3 , 2 , -2 , -5]
print YES as 3+2-5 = 0
question from:https://stackoverflow.com/questions/65873850/write-a-simple-program-in-python-about-sum-in-list