pythontest_format 练习一

# coding: utf-8
"""
# @Time : 2020/4/26 13:41
# @Author : Gina Gao
# @File :
# @Software: PyCharm
# @Descript:
"""
dict_test = {'Name': 'Runoob', 'num':{'first_num': '66', 'second_num': '70'}, 'age': '15'}

print(dict_test.get('first_num',"hghg")) # None

a=('{:^20}'.format('@'*10))
b=('{:>20}'.format('@'*10))
c=('{:<20}'.format('@'*10))
d=('{}'.format('#'*50))
print(a)
print(b)
print(c)
print(d,len(d))
print(dict_test.get('num').get('first_num')) # 66
posted @ 2020-10-13 22:58  yongqi-911  阅读(194)  评论(0编辑  收藏  举报