Answers for "how to check a set is empty in python"

1

how to check a set is empty in python

s = set()
if len(s) == 0:
  print('Empty')
else:
  print('Not empty')
Posted by: Guest on June-06-2021
-2

python check set empty

set_variable == set() # return True if set_variable is an empty set
Posted by: Guest on December-09-2020

Code answers related to "how to check a set is empty in python"

Python Answers by Framework

Browse Popular Code Answers by Language