Skip to content
Jerry Wu edited this page Nov 16, 2015 · 6 revisions

##歡迎來到 Jerry的Python課程

##課程問題1: 第三章作業要把代表人名改成第一個字大寫things=["mozzarella","cinderella","salmonella"],things.capitalize()為什麼錯誤呢 有沒有指令可以同時把M,C,S都改成大寫?

####回答

things=["mozzarella","cinderella","salmonella"]
things_new = ",".join(things)
things_new = things_new.title()
things_new.split(",")
things_new
Clone this wiki locally