#!/usr/bin/env python
# -*- coding:utf-8 -*-
print "\n".join(["*"*7 for i in range(4)])
print "\n"
print "\n".join(["*"*(i*2+1) for i in range(4)])
print "\n".join([("*"*(i*2+1)).center(7, " ") for i in range(4)])
print "\n".join([("*"*(abs(i-3)*2+1)).center(7, " ") for i in range(4)])
print "\n".join([("*"*([i,abs(i-6)][i>3]*2+1)).center(7, " ") for i in range(7)])
print "\n".join(["*"*([i,abs(i-6)][i>3]*2+1) for i in range(7)])
各種型 沒有達到你的要求 再追問
>>> ================================ RESTART ================================
>>>
*******
*
***
*****
#!/usr/bin/env python
# -*- coding:utf-8 -*-
print "\n".join(["*"*7 for i in range(4)])
print "\n"
print "\n".join(["*"*(i*2+1) for i in range(4)])
print "\n"
print "\n".join([("*"*(i*2+1)).center(7, " ") for i in range(4)])
print "\n"
print "\n".join([("*"*(abs(i-3)*2+1)).center(7, " ") for i in range(4)])
print "\n"
print "\n".join([("*"*([i,abs(i-6)][i>3]*2+1)).center(7, " ") for i in range(7)])
print "\n"
print "\n".join(["*"*([i,abs(i-6)][i>3]*2+1) for i in range(7)])
各種型 沒有達到你的要求 再追問
>>> ================================ RESTART ================================
>>>
*******
*******
*******
*******
*
***
*****
*******
*
***
*****
*******
*******
*****
***
*
*
***
*****
*******
*****
***
*
*
***
*****
*******
*****
***
*
>>>