HI am confused when using slash or back slash when referencing folder path and filer path. It seems to me that folder path uses \
or file path under folder path uses /
.
files=np.sort(glob('../export_result/*.csv'))
for f in files:
print(f)
For example, here is output of a filename:
../export_result\StressNodes_JLFUTop-Job_Dayfr3_to255_72A_4Part_UnDrainSide_DrainTop_NodeStress.csv
I am confused. Is it possible to let them use consistent same either /
or \
?
Forward slash and backslash are just separators for separating directories and files in a path. Different systems might use different separators. In Windows, the backslash is used as a separator:
In Mac and Unix/Linux, the slash is used:
For better and complete understanding, I suggest that you read this page: Python 3 Quick Tip: The easy way to deal with file paths on Windows, Mac and Linux