import platform
if platform.system() == 'Windows':
print("This is a Windows system.")
elif platform.system() == 'Linux':
print("This is a Linux system.")
else:
print("This is neither Windows nor Linux.")
Python-判断当前系统是linux还是windows
检测操作系统类型:Python中的platform模块示例
最新推荐文章于 2024-05-20 10:30:24 发布
176

被折叠的 条评论
为什么被折叠?



