jsup 2.1 - investor's relief (experiment on separation of investment and SNS)

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-2-1-investor-s-relief-experiment-on-separation-of-investment-and-sns Hello, this is @joviansummer(witness: @jswit). I'm starting a new experiment regarding my @jsup vote service. The purpose of this experiment is to separate STEEM investment and social interaction(posting/commenting). For many people, writing a post daily(literally 365 posts per year) is not easy. It's not fun, and mandatory daily post only written for self-voting delegation service tends to result in useless low-quality content. I hope this new function of @jsup will reduce those posts, and also make it a bit more easy to invest in STEEM without worrying about daily posting. I think pressure of daily posting significantly undermines Steem as SNS. It's not fun. This is how it works: From 11:45 PM to 11:50 PM every night(reference time zone is GMT+9), @jsup checks if eligible delegators wrote something and received daily v...

파이썬에서 문자열 대체

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포스팅 강박에서 벗어나기