I have a filepath that is structured as abcxyzfile.xlsx
I need the first section excluding the file name abcxyz with the two in the beginning and the additional one at the end as a string to be stored as a variable ie:
variable1 = “abcxyz”
Whenever I try and store the string it raises SyntaxError: EOL while scanning string literal
How do I correctly write this so that it doesn’t raise an error and keeps all of the ?
I have tried adding an r before the “” or using ” and “”” “””, all raise the same error.
gng235 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.