#!/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)

 

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2021-07-31
  • 2022-01-02
  • 2021-12-28
猜你喜欢
  • 2021-10-19
  • 2021-10-25
  • 2021-12-28
  • 2021-11-29
  • 2022-12-23
相关资源
相似解决方案