Gunnar
0
Q:

how to create a list of booleans default in python

# Python3 code to demonstrate  
# to perform boolean list initializing  
# using list comprehension  
  
# using list comprehension  
# to perform boolean list initializing 
res =  [True for i in range(6)] 
  
# printing result 
print ("The True initialized list is : " +  str(res)) 
0

New to Communities?

Join the community