Quick actions

cmd+k|ctrl+k

Navigation

Languages

Python 3 字符串类型:10

Snippet info

Language

Python

Visibility

public

Author

fenghestudio

Created

2019-11-24T05:40:44Z

Updated

2019-11-24T05:40:44Z

# 字符串占用20个字符空间,居中显示,空白处用 "*" 填充
print('>> {:*^20s} <<'.format('welcome'))

# 字符串占用20个字符空间,右对其,空白处用 "*" 填充
print('>> {:*>20s} <<'.format('welcome'))

# 字符串占用20个字符空间,左对齐,空白处用 "*" 填充
print('>> {:*<20s} <<'.format('welcome'))
INFO