How do you create an empty set object?

Asked 2 years ago, Updated 2 years ago, 146 views

Like this, list/tuple/dict has a literal meaning empty <list/tuple/dict>

I wonder if there's such a thing as a set.

python set literals

2022-09-22 22:12

1 Answers

Since there is no literal syntax for empty set

To create an empty set, just set().


2022-09-22 22:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.