Python 2代码:
healthamzn = "E:\ACADEMICS\PEC---\ME 4 SEM\code\data\amazon5core\healthcare"
jester = "E:\ACADEMICS\PEC---\ME 4 SEM\code\data\jester"
print(os.path.join(healthamzn, "healthcare5core.csv"))
print(os.path.join(jester,"jester_ratings.dat"))
输出:
E:\ACADEMICS\PEC---\ME 4 SEM\code\datamazon5core\healthcare\healthcare5core.csv
E:\ACADEMICS\PEC---\ME 4 SEM\code\data\jester\jester_ratings.dat
请注意,第一个输出不是我期望的。
预期输出:
E:\ACADEMICS\PEC---\ME 4 SEM\code\data\amazon5core\healthcare\healthcare5core.csv