it’s right answer for that quiz, but I feel that the quiz asked for a specific answer need help , and the line : if len(words) == 0 : continue can u tell me another way to do the same ?
Hi @Mahmmmoud I cannot access to your link since is expired session.
Well, the most similar to continue is pass
However there are differences, continue transfers the control of the loop to the beginning. While pass is a definitive pass (ignore the failed loop)
There is another commonly misunderstood, break is the contrary to pass if the condition in the loop is true, then it will break the flow of execution.
For more info:
@AndyG Thx for your response , I’m really newbie in python right now so , thx i wasn’t know if pass exist till u tell me , but i asked about a way to simplify the code more than this , and i hope that link is not expired PY4E - Python for Everybody ,
to access the Autograder : Exercise 8.5 you need to login