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

파이썬에서 문자열 대체

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


파이썬 문자열에서 특정 문자열을 다른 문자열로 대체하는 방법입니다. replace()를 사용합니다. 예시를 보면 금방 알 수 있습니다.

my_string = 'Hello. My name is John.'
# my_string의 'Hello'를 'Good morning'으로 대체하여 new_string에 할당
new_string = my_string.replace('Hello','Good morning')
print(new_string)

Good morning. My name is John.

# my_string의 마침표(.)를 느낌표로 대체하여 new_string에 할당
new_string = my_string.replace('.','!')
print(new_string)

Hello! My name is John!

별도의 옵션이 없으면 일치하는 모든 문자열을 대체합니다. 만약 위의 예시에서 처음에 나온 마침표 1개만 바꾸려면 최대 회수를 지정해 줍니다.

# 처음에 나온 1개만 대체
new_string = my_string.replace('.','!',1)
print(new_string)

Hello! My name is John.

Comments

Popular posts from this blog

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

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

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