回答編集履歴

1

編集

2021/04/13 12:10

投稿

FredericChang
FredericChang

スコア54

test CHANGED
@@ -17,3 +17,33 @@
17
17
  ```
18
18
 
19
19
  ![イメージ説明](f452600423bfa0a045b3c34d64974cba.jpeg)
20
+
21
+
22
+
23
+ 他の例:
24
+
25
+ - str.rjust(width[, fillchar])
26
+
27
+ - str.center(width[, fillchar])
28
+
29
+ - str.ljust(width[, fillchar])
30
+
31
+ ```python
32
+
33
+ print("[" + "jUICE".ljust(8) + "]")
34
+
35
+ >> [jUICE ]
36
+
37
+
38
+
39
+ print("[" + "Apple".center(8) + "]")
40
+
41
+ >> [ jUICE ]
42
+
43
+
44
+
45
+ print("[" + "Apple".rjust(8) + "]")
46
+
47
+ >> [ jUICE]
48
+
49
+ ```