This Python code uses the // operator mistakenly instead of the # comment character:
def all_z_words(wordlist : list) -> list:
"""produce list of words from the input that contain z"""
zlist = [] // start with an empty list
for wd in wordlist:
if "z" in wd:
zlist = [wd] + zlist
return(zlist)
Contact Details
No response
Which Web page has the problem?
https://dcic-world.org/2023-02-21/intro-python.html
What's the problem?
This Python code uses the
//
operator mistakenly instead of the#
comment character:What browser are you seeing the problem on?
Chrome