반응형 전체 글162 [파이썬🐍] 프로그래머스 : 핸드폰 번호 가리기 def solution(phone_number): s=list(phone_number) for i in range(0,len(s)-1): if i 2021. 4. 21. [파이썬🐍] 프로그래머스 : 평균 구하기 def solution(arr): return sum(arr)/len(arr) 2021. 4. 20. [파이썬🐍] 프로그래머스 : 수박수박수박수박수박수? def solution(n): answer=['수'] for i in range(1,n): if i==0 or i%2==0: answer.append("수") else: answer.append("박") return "".join(answer) 2021. 4. 20. [파이썬🐍] 프로그래머스 : 서울에서 김서방 찾기 def solution(seoul): for i in range(len(seoul)): if seoul[i]=="Kim": return f"김서방은 {i}에 있다" 첫번째 생각해낸 방법 def solution(seoul): return ('김서방은 %d에 있다' %seoul.index('Kim')) 두번째 생각해낸 방법 2021. 4. 20. 이전 1 ··· 25 26 27 28 29 30 31 ··· 41 다음 반응형