Learn Python from a baby! Record the questions in the Blue Bridge Cup Python learning and test preparation process, and record every moment.
Attached is a summary post: Pupils Blue Bridge Cup Python Breakthrough | Summary_COCOgsta's Blog-CSDN Blog
【Code Explanation】
for i in range(1, 6):
for j in range(i):
print("*", end='')
print()
for i in range(4, 0, -1):
for j in range(i):
print("*", end='')
print()
复制代码
【operation result】
*
**
***
****
*****
****
***
**
*