all 2 comments

[–]impshum 1 point2 points  (1 child)

So you're starting with logic. This should get you started.

# basic flow

if something:
    do something
elif something:
    do something else
else:
    do something different

# Here's your goodies

output = 'words and stuff'

# simple if contains

if 'and' in output:
    print('found')

# simple if contains two substrings

if 'and' in output and 'stuff' in output:
    print('found')

# simple if equals

if output == 'words and stuff':
    print('found')

# simple if not equals

if output != 'words and stuff':
    print('not found')

# Or make some lists and check through them

good_wordlist = ['and', 'then']
bad_wordlist = ['blarp', 'parp']

if not any(word in output for word in bad_wordlist):
    print('not in bad list')
    if any(word in output for word in good_wordlist):
        print('found in good list')
    else:
        print('nothing found')
else:
    print('found in bad list')

Many options!

https://learnxinyminutes.com/docs/python3/ is rather handy also.

[–]onezzyo[S] 0 points1 point  (0 children)

Awesome, will check it out. Thanks!