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 ...

파이썬에서 json 형식 문자열(str) - 딕셔너리(dict) 변환

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/json-str-dict


json 형식과 파이썬의 딕셔너리(dict)는 형식이 동일합니다. 파이썬에서 json 모듈을 이용하면 json 형식의 문자열을 딕셔너리로 변환할 수 있습니다. json.loads()를 사용합니다.

import json
# json 형식의 문자열
fruits_json = '{ "apple":10, "orange":3, "banana":7 }'
# 딕셔너리로 변환
fruits_dict = json.loads(fruits_json)

위의 예시에서 fruits_json은 문자열(str)이고 fruits_dict는 딕셔너리(dict)입니다.

print(fruits_dict['orange'])

3

반대로 딕셔너리를 json 형식 문자열로 바꾸려면 json.dumps()를 사용합니다.

# 딕셔너리
scores_dict = { 'bob':83, 'john':92, 'jane':93 }
# json 형식 문자열로 변환
scores_json = json.dumps(scores_dict)

위의 예시에서 scores_dict는 딕셔너리이고 scores_json은 문자열입니다.

Comments

Popular posts from this blog

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

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

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