Hello guys, today we going to learn how to check if a list is empty
#empty list list_1 = [] #checking if list is empty by using len() if not llist_1: print('yes! the list is empty.') #output #yes! the list is empty.
Hello guys, today we going to learn how to check if a list is empty
#empty list list_1 = [] #checking if list is empty by using len() if not llist_1: print('yes! the list is empty.') #output #yes! the list is empty.
Do you like it? Share on social networks!
C ++ - Test 004. Pointers, Arrays and Loops
C ++ - Test 004. Pointers, Arrays and Loops
C ++ - Test 004. Pointers, Arrays and Loops
Автор, очень плохой совет, не делайте так никогда.
делайте как написал Анатолий Жучков, в коментариях
thanks
but if i wanna to check if list is exists how can i do that?
It works similar. If list not exists, then list is None
Therefore the following code is right
And just FYI
I am admin of this site, and I want ask you add special separator in your articles, like this
This is special separator, which separate preview part from main part of article. Please, use it in articles (notes) on this site.
I think you saw some changes in articles after first publication. Just I made moderation and some cleaning of article for improvement of content.