if name in employees :
print("The name is: " + name)
else:
print(f"The name not : {name}")
ما الفرق هنا بين not
او in
هنا استطعت التأكد من الموظف موجود ام لا بدون استخدام not
لماذ استخدم not
words =["python", "php", "java", "ruby"]
def finder (iterable, text):
def find(login):
for i in login:
if str(i).startswith(text):
return True
return False
return list(filter(find, iterable))
result = finder(words, "p")
print(result)
# ما فائدة iterable vs text