An Interest In:
Web News this Week
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
July 31, 2020 03:20 pm GMT
Original Link: https://dev.to/godwin_france/python-if-statement-1ol2
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:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To