python - Using if-condition to check filename -
I am making a real mistake in Python, but can not figure out what it is
filename = "file1" if name == 'file1' print1
I am getting an invalid syntax error
What's the name ?? Do you define it elsewhere? I instead consider "filename", so if "name" is then
filename = "file1" If defined, then the problem is actually "if" at the end of the line ":".
Comments
Post a Comment