Hiro 714
asked on
Python question
I want to append a string if anything does not start with azbox- or flx-
Please advise.
Please advise.
if x not in res and x != 'azbox-monitor' and x != 'flx-azbox':
res.append(x)
print(x)
What's 'anything'?
ASKER
like azbox-* or flx-*
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is x and what is res?
Can you post some sample data?
If you want to find out if a string starts with another string you can use startswith.
Can you post some sample data?
If you want to find out if a string starts with another string you can use startswith.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.