프로그래머스. 제일 작은 수 제거하기 파이썬 풀이

minan·2021년 6월 28일
0

프로그래머스

목록 보기
60/92

프로그래머스. 연습문제. Level 1. 제일 작은 수 제거하기 파이썬 풀이

문제링크 https://programmers.co.kr/learn/courses/30/lessons/12935

def solution(arr):
	# 제일 작은 수 제거
    arr.pop(arr.index(min(arr)))
    # arr이 빈 배열이라면 -1 return 
    return arr if arr else [-1]
profile
https://github.com/minhaaan

0개의 댓글