python字典格式化输出
2024-08-26 00:39:06
#!/usr/bin/env python
#coding=utf-8
#__author__='David Chung' dict1={'pid':1375,'type':'cpu','resource':2048} print "%(pid)s,%(type)s,%(resource)s" %dict1 print "{0[pid]},{0[type]}:{0[resource]}".format(dict1) print "{pid},{type}:{resource}".format(**dict1)
最新文章
- a different object with the same identifier value was already associated with the session:
- SharePoint 2013 母版页取消和HTML页关联
- C#实现略缩图
- C#复习⑦
- git创建仓库
- OpenSSL - 网络安全之数据加密和数字证书
- 17) JMS: java Message Service(Java消息服务)
- USACO Section 3.3: Riding the Fences
- php 开发最好的ide: PhpStorm
- POJ2411 Mondriaan's Dream 轮廓线dp
- jeesz分布式架构集成阿里云oss存储
- angular 4使用jquery 第三方插件库
- java启动监听错误: org.springframework.web.context.ContextLoaderListener
- Vue 2.0基础语法:系统指令
- Python基础--函数的嵌套和闭包
- Java应用服务器Resin
- URL安全的Base64编码,解码
- mysqlbinlog恢复数据注意事项【转】
- Selenium基础知识(三)元素判断
- 【动态规划】最大子段和问题,最大子矩阵和问题,最大m子段和问题
热门文章
- com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver
- proxy,https,git,tortoise git,ssh-agent,ssh-add,ssh,ssl,rsync
- talib 中文文档(十一):Cycle Indicator Functions 周期指标
- Android中的Handler及它所引出的Looper、MessageQueue、Message
- 剑指offer总结
- 'ascii' codec can't decode byte 0xc4 in position 27: ordinal not in range(128)
- C++模拟Http/Https访问web站点
- ubuntu 搭建ftp服务器,可以通过浏览器访问,filezilla上传文件等功能
- STL学习笔记--序列式容器
- cocos代码研究(21)Widget子类Text,TextAtlas,TextBMFont学习笔记