250x250
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 | 31 |
Tags
- DATE_SUB
- 한줄for문
- Til
- 가설검정
- f-string
- python
- SQL
- 시각화
- 태블로
- SQLD
- 선형회귀
- 내배캠_학습기록
- Set
- 아티클스터디
- AB테스트
- 프로그래머스
- 내일배움일지
- 리스트
- 이중for문
- 데이터전처리
- 다중공선성
- 통계학
- ★
- Leetcode
- 데이터시각화
- 반복문
- Max
- 내일배움캠프
- map
- Join
Archives
- Today
- Total
노력에는 지름길이 없으니까요
리스트를 문자열로 붙이기 본문
728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181841#
join을 쓰도록 하자.
def solution(str_list, ex):
return ''.join([s for s in str_list if ex not in s])
똑같은 글자를 n번 붙이는 문자열을 만드는 법... * 사용하기
a, b = map(int, input().strip().split(' '))
for i in range(b) :
for j in range(a) :
print("*",end="")
print(" ")
a, b = map(int, input().strip().split(' '))
answer = ('*'*a +'\n')*b
print(answer)
728x90
반응형
'Python' 카테고리의 다른 글
콜라츠 추측 - 큰 수 반복문 (0) | 2024.06.18 |
---|---|
자연수 뒤집어 배열로 만들기 feat. map 사용법.... (0) | 2024.06.18 |
숫자의 짝홀수 구별하여 결과 출력하기 (0) | 2024.06.17 |
리스트 내 배수 찾기 (0) | 2024.06.17 |
두 수 중에 더 큰 쪽 판별하기 (0) | 2024.06.17 |