I am trying to read in a file only if several conditions are met. However, the only method I can get working is repetative. Is there a way to simplyfy the conditions into a list and call the list, or a more simplified way of achieving this result? For example
if '$' not in file and '~' not in file and 'diab' not in file:
where file
is the file name and it cannot contain the characters $,~
nor any elaboration of the word diab
such as diablo.
Thank you in advance