Python သည် List Item ရှိမရှိ စစ်ဆေးပါ။
List Item ရှိမရှိ စစ်ဆေးပါ။
စာရင်းတစ်ခုတွင် သတ်မှတ်ထားသည့်အရာတစ်ခုရှိမရှိ ဆုံးဖြတ်ရန် in
အဓိကစကားလုံးကို အသုံးပြုပါ-
ဥပမာ
စာရင်းထဲတွင် "apple" ရှိမရှိ စစ်ဆေးပါ။
thislist = ["apple", "banana", "cherry"]
if "apple" in thislist:
print("Yes, 'apple' is in the fruits list")