GentBG x PUSSTEEM - burning both STEEM and PUSS

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-x-pussteem-burning-both-steem-and-puss Hello, this is @joviansummer(witness: @jswit), developer of GentBG project. I registered @gentbg account to PUSSTEEM about a week ago and donated some of my own PUSS token to @gentbg's EPUSS account. Now, @gentbg will burn STEEM and EPUSS at the same time. PUSSTEEM's boosting upvotes will help increasing baseline burning significantly. @gentbg's SP reward is delegate to @jsup to get automated upvotes, forming a baseline burning of liquid reward independent of other people's upvotes. Some may argue 100%(both liquid and SP reward) burning is much better, but I chose this approach to prevent @gentbg from becoming a spamming account. Constantly asking for upvotes via mentioning and commenting every week may eventually become a big annoyance to curators. That being said, anyone is welcome to participate in countering STEEM inflation by giving upvotes ...

파이썬에서 스택(stack) 사용

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/stack


파이선에서 리스트(list) 형식을 스택(stack)으로 사용할 수 있습니다. 데이터를 하나씩 추가하고, 사용하기 위해 뺄 때는 가장 나중에 추가된 데이터부터 역순으로 빼 오는 방식입니다.

리스트에서 데이터를 추가하기 위한 append()가 있고, 마지막 데이터를 가져온 후에 삭제하는 pop()이 있기 때문에 간편하게 스택으로 사용할 수 있습니다. 간단한 예시를 보겠습니다.

# 리스트 초기화
x = []
# 데이터 추가
x.append('abc')
x.append('def')

# 몇개의 데이터가 추가되었는지 확인
print(len(x))

# 리스트 내용 출력
print(x)

['abc', 'def']

리스트에 저장된 원소의 인덱스값을 -1로 지정하면 가장 마지막 원소를 지칭하므로, 마지막에 저장된 데이터는 x[-1]에 있습니다.

# 마지막에 저장된 데이터 출력(삭제는 하지 않음)
print(x[-1])

'def'

데이터를 꺼내서 변수 y에 저장해 봅니다.

y = x.pop()

이제 y에는 문자열 'def'가 저장되어 있고, x는 원소가 하나 줄어서 ['abc'] 이렇게 됩니다.

print(x)

['abc']

print(y)

'def'

순차적으로 가져온 데이터를 역순으로 하나씩 처리해야 할 때 편리합니다.


@joviansummer의 스팀 프로젝트

스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)

jswit 증인 노드 프로젝트를 시작합니다.

jsup 업보팅(upvoting) 서비스 소개

jsup 수혜자 지정 기능 추가

Comments

Popular posts from this blog

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

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

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