Jul-05-2019, 07:00 AM
Not to address the problem but suggestion to improve code:
so one can use:
if f.endswith(".pdf") or f.endswith(".docx") or f.endswith(".doc"):str.endswith() accepts tuple as argument:
Quote:Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for.
so one can use:
if f.endswith(('.pdf', '.docx', '.doc'))
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.