0
点赞
收藏
分享

微信扫一扫

Python学习经历

列表索引for循环改内容大写

s = ["张无忌","武则天","刘备","abc","cba"]
for lst in range(len(s)):
x = s[lst].upper()
s[lst] = x
print(s)


举报

相关推荐

0 条评论