列表索引for循环改内容大写s = ["张无忌","武则天","刘备","abc","cba"]for lst in range(len(s)): x = s[lst].upper() s[lst] = xprint(s)