Q. In which situations should you use list comprehensions and in which situations you should not use comprehensions?
Answer =
• We should use list comprehensions in that situation when we want to make a program more readable, shorter and more efficient.
• We should not use list comprehensions in that situation when we need to check multiple conditions.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )