For future coding conundrums, an "or" can be viewed as an if / elif, and "and" can be viewed as two nested if statements, which you would adapt to while() statements.
while overwrite != 'Y'.lower() or overwrite != 'N'.lower(): becomes
if overwrite != 'Y'.lower():
do something
elif overwrite != 'N'.lower():
do the same thing
For completeness, the 'and' would be
if overwrite != 'Y'.lower() and overwrite != 'N'.lower(): becomes
if overwrite != 'Y'.lower():
if overwrite != 'N'.lower():
do something
Hopefully this will help sort out the and/or's in the future.
Reputation Points: 741
Solved Threads: 691
Nearly a Posting Maven
Online 2,302 posts
since Dec 2006