Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- index
- Boto3
- Python 나머지
- Algorithm
- Unknown command: cask
- Modified Date
- 피보나치 수
- list.pop(0)
- list to set
- python3
- sort()
- 알고리즘
- Python 몫
- set to list
- RecursionError
- 프로그래머스
- List to String
- List
- Split
- string
- 알고리즘 풀이
- sting position
- list.sorted()
- homebrew-core is a shallow clone.
- permutations
- COUNT
- Python
- List 초기화
- cask
- zip()
Archives
- Today
- Total
데이터와 코드로 세상을 바라봅니다.
[Python3] - String, index, concat, add 본문
def solution(N):
answer = ''
for i in range(1,N+1):
answer_star = ''
for k in range(1,i+1):
answer_star = answer_star+"*"
answer = answer+answer_star+"\n"
answer = answer[:-1]
print(answer)
return answer
[문제] - 별 찍기 - 1
문제 설명
첫번째 줄에서 N번째 줄까지 다음과 같은 규칙으로 출력한 결과값을 구하여라.
(1 <= N <= 100)
N = 1
*
N = 3
*
**
***
N = 4
*
**
***
****
[참고자료]
위키독스
온라인 책을 제작 공유하는 플랫폼 서비스
wikidocs.net
[python] 문자열을 효율적으로 concat 하는 방법
파이썬에서 문자열을 효율적으로 concat 하는 방법을 찾아보다가 좋은 사이트를 발견해서 스크랩 해본다. 원문에서 방법 4, 5, 6을 추천하고 있다. 방법 6이 가장 빠르기 때문에 많이 사용하고, 방
118k.tistory.com
'Code > Python' 카테고리의 다른 글
[Python3] - for, string add (0) | 2020.11.23 |
---|---|
[Python3] - String reverse, String split (0) | 2020.11.18 |
[Python 3] - list(), stack concept, pop(), len(), append() (0) | 2020.11.09 |
[Python 3] - List, sorted(), pop(), index() (0) | 2020.11.06 |
[Python 3] - String, Upper(), Lower(), Count(), Contain() (0) | 2020.11.05 |