def solution(wallpaper):
row, column = [],[]
c=0
for i in wallpaper:
for r in range(len(i)):
if i[r]=='#':
column.append(c)
row.append(r)
c+=1
answer=[min(column), min(row), max(column)+1, max(row)+1]
return answer
'코딩테스트 | python > 프로그래머스' 카테고리의 다른 글
| [프로그래머스 | python] 전화번호 목록 (0) | 2024.02.06 |
|---|---|
| [프로그래머스 | python] 완주하지 못한 선수 (1) | 2024.02.06 |
| [프로그래머스 | python] 다리를 지나는 트럭 >> 다시 풀어보기 (0) | 2024.02.06 |
| [프로그래머스 | python] 덧칠하기 (0) | 2023.10.20 |
| [프로그래머스 | python] 달리기 경주, 추억 점수 (0) | 2023.06.18 |