Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 31, 2020 03:20 pm GMT

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 ?


Original Link: https://dev.to/godwin_france/python-if-statement-1ol2

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To