回答編集履歴

1

書式の改善

2024/11/20 00:36

投稿

little_street
little_street

スコア402

test CHANGED
@@ -3,7 +3,7 @@
3
3
  ```Python
4
4
  import re
5
5
 
6
- rcd = ['1DF', '2', '10F0','300AAA','1100A0']
6
+ rcd = ['1DF', '2', '10F0', '300AAA', '1100A0']
7
7
  ptn = re.compile(r'^(\d+)((\D.*)?)$')
8
8
 
9
9
  no = [re.sub(ptn, r'\1', s) for s in rcd]