GentBG - why bother to burn STEEM?

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-why-bother-to-burn-steem GentBG - a new experiment to burn STEEM Hello, this is @joviansummer(witness: @jswit). I'd like to briefly explain why I bothered to start @gentbg experiment. Unlike bitcoin, STEEM has no supply limit. As long as STEEM exists, newly minted STEEM will be added to total supply. If we can't maintain corresponding demand or reduce supply, downward pressure on STEEM price can be a big challenge. @gentbg project is an experiment to reduce STEEM supply by burning. @gentbg will burn liquid author reward and delegate SP reward to @jsup to get amplified upvotes. The main purpose is to create a perpetual STEEM burning loop. I added a bit of fun factor via AI-generated images, to incentivize giving upvotes to @gentbg's posts. If you have some spare voting power, you can contribute to burning STEEM by giving upvotes to @gentbg's posts. Initial run of this experiment wil...

파이썬에서 리스트(list) 정렬(sort)

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/list-sort


sorted() 함수를 이용해서 리스트에 담긴 값들을 정렬할 수 있습니다.

x = [1, 3, 5, -1, 0]

# x의 값을 오름차순으로 정렬하여 x_sorted에 할당
x_sorted = sorted(x)

결과값을 비교하면 아래와 같습니다.

print(x) [1, 3, 5, -1, 0]

print(x_sorted) [-1, 0, 1, 3, 5]

반대로 내림차순 정렬을 하려면 아래와 같이 합니다.

# x의 값을 내림차순으로 정렬하여 x_sorted_rev에 할당
x_sorted_rev = sorted(x, reverse=True)

print(x_sorted_rev)

[5, 3, 1, 0, -1]

리스트에 문자열을 저장했을 경우에도 정렬이 됩니다.

y = ['xyz', 'def', 'abc']
y_sorted = sorted(y)

print(y_sorted) ['abc', 'def', 'xyz']

한가지 생각할 점은, 리스트에 담긴 값들이 같은 종류의 값이어야 한다는 점입니다. 예를 들어 문자열(string)과 정수(int)가 혼합된 리스트에서는 sorted() 함수를 사용하지 못합니다.

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기