Python IF statement

‘>>> # Measure some strings:
… words = [‘cat’, ‘window’, ‘defenestrate’]

for w in words:
… print(w, len(w))

cat 3
window 6
defenestrate 12′

I want to assume that I know what lead to the output but I do not fully understand the if statement. What is the use of the variable “w” ?
I mean , what is it doing ?

原文链接:Python IF statement

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容