‘>>> # 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
暂无评论内容