请反转字符串&34;aStr&34;print(&34;aStr&34;[:1])8.将字符串&34;k:1|k1:2|k2:3|k3:4&34;xff0c;处理成字典 {k:1,k1:2,.}str1&61;34;k:1|k1:2|k2:3|k3:4&34;def str2dict(str1): dict1&61;{} for iterms in str1....
6、反转由单词和不定个数空格组成的字符串,要求单词中的字母顺序不变。如:"I love this game!反转成“game!this love I”。1 2 3 4 gt;gt;gt;import re gt;gt;gt;AAA="I love this game!gt;gt;gt;BBB=''....