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 |
Tags
- List Comprehension
- 프로그래머스
- SQL 고득점 Kit
- YOLOv5
- 백준
- count
- where
- 프로젝트
- map
- 파이썬
- 파이썬 슬라이싱
- 파이썬 몫
- GIT
- Django
- sql
- python
- Len
- Python3
- 아이엠어바텐더
- ORDER BY
- pcce 기출문제
- 슬라이싱
- 단어 공부
- 설계
- 코딩테스트 연습
- Join
- 데이터
- css
- html
- date_format
Archives
- Today
- Total
nan + nan = 2nan
[백준][Python3] #9086. 문자열 본문
728x90
코드 입력
def print_(word):
"""
단어의 첫 글자와 마지막 글자만 뽑는 함수
"""
start = word[0]
end = word[-1]
return start + end
cnt = int(input())
# 처음 주어진 횟수만큼 루프문 생성
for _ in range(cnt):
start_end = print_(input())
print(start_end)
출처 : 백준 Online Judge
'Python > 백준 알고리즘' 카테고리의 다른 글
[백준][Python3] #11718. 그대로 출력하기 (2) | 2024.02.29 |
---|---|
[백준][Python3] #2444. 별 찍기 - 7 (2) | 2024.02.29 |
[백준][Python3] #2743. 단어 길이 재기 (0) | 2024.02.27 |
[백준][Python3] #10811. 바구니 뒤집기 (0) | 2024.02.26 |
[백준][Python3] #10813. 공 바꾸기 (0) | 2024.02.25 |
Comments