Session3 : Today's Learning
The sequence of methods in the same command line
# If there are a sequence of methods in the same command line, methods are executed from left to right.
string1 = "2022-03-21"
string1.replace('-','/').replace('2022/0','')
print(string1)
# "3/21"
Another effective way to input arguments at Terminal
# Instead of using 'input()', you can use 'readline()' method from 'stdin' module of 'sys' package.
import sys
n = sys.stdin.readline().rstrip()
# you'd better use '.rstrip()' to remove the following '\n'.
Author And Source
이 문제에 관하여(Session3 : Today's Learning), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@ziwe_ek/Session3-Todays-Learning저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)