>>> 'Hello'.rjust(10) ' Hello' >>> 'Hello'.rjust(20) ' Hello' >>> 'Hello World'.rjust(20) ' Hello World' >>> 'Hello'.ljust(10) 'Hello ' >>> 'Hello'.rjust(20 ...
Pythonでは文字列操作に便利なメソッドがいろいろあります。 ・startswith():引数で与えた文字列で始まる場合Trueを返す。それ以外はFalseを返す。 ・endswith():引数で与えた文字列で終わる場合Trueを返す。それ以外はFalseを返す。 ・join():引数で与えたリストを ...
#Prog06. rjust() add space characters at the beginning of the string to complete the number of characters specifies in function parameter. Create a program that do the same functionality without using ...