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/1tuzx


파이썬에서 문자열을 사용할 때 특정 위치의 글자들을 편리하게 가져올 수 있습니다.

x = 'hello world'

위와 같이 x에 문자열 'hello world'를 할당해 주었습니다. 첫번째 글자, 두번째 글자 등 특정 위치의 글자 하나를 가져오려면 아래의 예시처럼 할 수 있습니다.

# 문자열 x의 첫번째 글자 출력
print(x[0])

h

x[0]이 첫번째 글자인 'h', x[1]이 두번째 글자인 'e'가 됩니다.

범위를 지정할 수도 있습니다. 만약 첫번째부터 세번째 글자까지 가져오고 싶다면 x[0:3] 이렇게 설정합니다.

# 문자열 x의 첫번째부터 세번째 글자까지 출력
print(x[0:3])

hel

유의할 점은, 위치가 0부터 시작하고, 콜론(:) 다음에 지정되는 인덱스값은 출력값에 포함되지 않는다는 점입니다. x[0:3]이면 x[0]부터 x[2]까지 가져오는 것입니다.

특정 위치부터 마지막까지 가져올 수도 있습니다. 끝나는 위치를 지정하지 않으면 됩니다.

# 2번째 글자부터 끝까지 출력
print(x[1:])

ello world

Comments

Popular posts from this blog

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

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

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