摘要: 1 str.capitalize() 把字符串的第一个字符大写 2 str.center(width) 返回一个原字符串居中,并使用空格填充到width长度的新字符串 3 str.ljust(width) 返回一个原字符串左对齐,用空格填充到指定长度的新字符串 4 str.rjust(width) 阅读全文
posted @ 2021-08-12 16:53 小白笑苍天 阅读(92) 评论(0) 推荐(0)
摘要: python中,platform模块给我们提供了很多方法去获取操作系统的信息如: 1 import platform 2 platform.platform() #获取操作系统名称及版本号,'Windows-7-6.1.7601-SP1' 3 platform.version() #获取操作系统版本 阅读全文
posted @ 2021-08-12 16:20 小白笑苍天 阅读(841) 评论(0) 推荐(0)