nakka soft world !
[Python] Bubble sort 본문
728x90
a=int(input())
b=list(map(lambda x:int(x), input().split()))
for i in range(1, a):
for j in range(a-i):
if(b[j] > b[j+1]):
temp = b[j]
b[j] = b[j+1]
b[j+1] = temp
print(b)
728x90
'프로그래밍언어 > Python' 카테고리의 다른 글
Oracle Cloud에 Flask 서버 구축 (0) | 2024.06.02 |
---|---|
[Python] 디렉토리 관련 명령어 (0) | 2021.06.07 |
[Python] Pandas dataframe txt로 저장하기 (0) | 2021.01.30 |
dart-fss를 활용하여 기업 재무 재표 가져 오기 (0) | 2020.12.22 |
Global 변수 값 변경 (0) | 2016.09.24 |
Comments