AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() And this will result in just looping over the given list. However, instead of performing some operation, we can just use the print() function in the list comprehension. List comprehension is a quick walk to take a list, perform certain operations on all the list items, and form a new list from it. Read: How to Reverse a List in Python Method 4: Python loop through a list using list comprehension Here is the result of the above Python program.
0 Comments
Read More
Leave a Reply. |