格式化输出

python3.6的新特性:

print(f'epoch: {epoch}; train_acc: {train_acc}; test_acc: {test_acc}') 等价于: print("epoch: ", str(epoch), "; train_acc: ", str(train_acc), "; test_acc: ", str(test_acc))

 

posted @ 2017-12-24 21:47  爱学英语的程序媛  阅读(236)  评论(0编辑  收藏  举报