user77866
0
Q:

'print(list(' empty filter

# Python3 using join() +  split() 
  
# initializing list  
test_list = ["", "GeeksforGeeks", "", "is", "best", ""] 
  
test_list = ' '.join(test_list).split() 
      
# Printing modified list  
print ("Modified list is : " + str(test_list)) 
0
[name for name in starring if name.strip()]
0
'''
This is a classic python3 doh!.

A filter is a special iterable object you can iterate over. However, much like a generator, you can iterate over it only once. So, by calling list(people2), you are iterating over each element of the filter object to generate the list. At this point, you've reached the end of the iterable and nothing more to return.
'''
0

New to Communities?

Join the community