← come back | Golfdocs - Pyth

.{ - dot opening brace, dot left brace - create set

Definition 1

Convert a collection (any of string, list, set or dictionary) to set.
If any of the collection's elements are not hashable, convert all elements to tuples and then convert to set.[1]

Definition 2

Create a set containing a number.[1]

Definition 3

Create an empty set.[1]

Synopsis

.{<item>
Where <item> depends on the definition (it might not exist at all).

Example

.{,1 2
.{1
.{
Try it online! Result:
{1, 2}
Try it online! Result:
{1}
Try it online! Result:
set()

References

  1. pyth.herokuapp.com/rev-doc.txt

Fork this collection on GitHub! o/