#๐Ÿ”’ Why does this work, but not this

21 messages ยท Page 1 of 1 (latest)

full galleon
#

^

final kestrelBOT
#

@full galleon

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

full galleon
#

if ("Fierce" not in distinct_items[test][0]['item_name']):

#
if ("Fierce" not in distinct_items[test][0]['item_name'] or ("Pure" not in distinct_items[test][0]['item_name'] ):```
#

first works, but the second does not

#

also the second is just one line its just displaying as 2 for some reason

#

and how do i make the second work?

past onyx
full galleon
#

yeah if it doesnt contain both then continue

past onyx
#

Or overall it's not working , the first condition not working in the second code snippet?

full galleon
#

if its only one condition it works perfectly fine

#

with both, neither take effect

robust fog
#

the condition is true if EITHER of them is not found

#

what exactly are you trying to do?

full galleon
#

oh i need and dont i?

#

that checks out

robust fog
#

if you're trying to check if NEITHER are present then yes, it should be and instead of or

full galleon
#

okay thanks lol

#

!solved

final kestrelBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.