最佳答案
在 python 中,我有变量 base_dir和 filename。我想连接他们获得 fullpath。但是在窗口下我应该使用 \和 POSIX /。
fullpath = "%s/%s" % ( base_dir, filename ) # for Linux
我如何使这个平台独立?