题目要求 Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. 题目分析及思路 题目给出一个字符串,要求将每个词中的字母顺序颠倒,但仍旧保留空格和原先的词序.可以用.split()方法将词分开并遍历,最后倒序并组成新的字符串. python代码 class…