OlveraeUNSW
返回题目列表
COMP2041

22T2 Q6 — 姓名重排(Last, First → First Last)

stdin 每行是姓名 姓, 名,可能带尾随空白。改写为 名 姓,保留尾随空白。不匹配 <x>, <y> 的行原样输出。

(确切格式在此固定,原卷源仅有摘要。)


Python only. From COMP2041/9044 — adapted for autotest.

样例

stdin
Costner, Kevin Augustus 
Carey, Mary
NoComma
期望输出
Kevin Augustus Costner 
Mary Carey
NoComma
python3
14