2014-07-20 48 views
0

第一個字母分離和資本(蟒蛇3)第一個字母分離和資本

讓我們說我們有這樣一句話: 「神看着每一件事情,他做了,不料,這是非常好的,傍晚和早上是第六天。「

輸出: A G發E T T [H H M A乙I W V G甲T E叔男女Ť小號d

事實上,我知道如何做到這一點,但不知道1如何在

回答

3
>>> s = "And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day." 
>>> ' '.join([i[0].upper() for i in s.split()]) 
'A G S E T T H H M A B I W V G A T E A T M W T S D' 
相關問題