본문 바로가기
Dev/Python 기초

[python3] *로 왼쪽정렬 맞추기

by hyelee.dev 2022. 6. 15.

for i in range(1,6):

    print(' '*(5-i), '*'*(i))

 

     *
    **
   ***
  ****
 *****

 

'Dev > Python 기초' 카테고리의 다른 글

[python3] 소수구하기  (0) 2022.06.15
[python3] 계절  (0) 2022.06.15
[python3] 밀리세컨드  (0) 2022.06.15
[python3] 거스름돈  (0) 2022.06.15
[python3] 고무공 높이 계산  (0) 2022.06.15