Py学习  »  Python

Python打印格式建议

Kumar • 4 年前 • 713 次点击  

我想按以下格式打印输出。

echo 'Stats,tableName=test ItemCount=1,TableSizeBytes=85'

我的代码如下。 任何帮助都将不胜感激。

输出:

echo Stats tableName= test ItemCount= 1 TableSizeBytes= 85

代码:

from __future__ import print_function
import boto.dynamodb
import boto

for table in lts:
    tableinfo = conn.describe_table(table)
    TableName = tableinfo['Table']['TableName']
    ItemCount = tableinfo['Table']['ItemCount']
    TableSize = tableinfo['Table']['TableSizeBytes']
    print('echo','Dynamostats','TableName=',TableName,'ItemCount=',ItemCount,'TableSizeBytes=',TableSize)
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/57091
 
713 次点击  
文章 [ 3 ]  |  最新文章 4 年前