File Name issue
On 10/17/20 4:12 PM, Steve wrote:
> The line:
> with open("HOURLYLOG.txt", 'r') as infile:
> works but, when I rename the file, the line:
> with open("HOURLY-LOG.txt", 'r') as infile:
> does not. The complaint is: Cannot Assign to operator
> However, I have:
> And it works.
> At first, I thought the issue was due to having the - in the filename.
> Is there a fix or explanation for this?
I am unsure if this will help but you could try putting an r in front of
the quotes to make it take raw data only.
with open(r"HOURLY-LOG.txt", 'r') as infile