OILS / opy / gold / set_and_dict_comp.py View on Github | oilshell.org

12 lines, 5 significant
1#!/usr/bin/env python2
2"""
3set_comp.py
4"""
5from __future__ import print_function
6
7s = {x+1 for x in (1,2,3)}
8print(s)
9
10d = {x+1: None for x in (1,2,3)}
11print(d)
12