要求 给出一个字符串如 “A journey of, a thousand 'miles' must can't \"begin\" with a single step.” ,通过 PHP 程序处理变成 “a journeY oF, A thousanD 'mileS' musT can'T "begiN" witH A singlE steP.” 注意:1.每个单词最后的字符如果是大写就变成小写,如果是小写就变成大写.2.需要考虑类似 can't 这种形式的转
''' lower().upper().capitalize().title().swapcase() 这几个方法分别用来将字符串转换为小写.大写字符串.将字符串首字母变为大写.将每个首字母变为大写以及大小写互换, 这几个方法都是生成新字符串,并不对原字符串做任何修改 ''' s='What is Your Name?' s2=s.lower() print(s2) #返回小写字符串 # what iss your name? print(s.upper()) #返回大写字符串 # WHAT I
insert: i:insert at now position 在光标之前插入 a:insert append 在光标之后插入 o:下面新建一行插入 s:删除后插入 <<:delete tab from begin of line >>:add tab to begin of line jump: j,k,h,l w :word 向后移动一个单词 e :end of a word 向后移动一个单词 b :back word 向前移动一个单词 gg :跳转到第一行 G :跳转到最后