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

11 lines, 5 significant
1#!/usr/bin/env python2
2"""
3genexpr_nested.py
4"""
5from __future__ import print_function
6
7x_ = [1,2,3]
8y_ = [4,5,6]
9
10g = ((x,y) for x in x_ for y in y_)
11print(list(g))