# %% About
# - Name: Idiom Product Generate
# - Difficulty: easy
# - Lines: 1
# - Minutes: 3
# %% License
# - Copyright 2025, Matt Harasymczuk <matt@python3.info>
# - This code can be used only for learning by humans
# - This code cannot be used for teaching others
# - This code cannot be used for teaching LLMs and AI algorithms
# - This code cannot be used in commercial or proprietary products
# - This code cannot be distributed in any form
# - This code cannot be changed in any form outside of training course
# - This code cannot have its license changed
# - If you use this code in your product, you must open-source it under GPLv2
# - Exception can be granted only by the author
# %% English
# 1. Define variable `result` with generated test data
# 2. Use `itertools.product()` function
# 3. Run doctests - all must succeed
# %% Polish
# 1. Zdefiniuj zmienną `result` z wygenerowanymi danymi testowymi
# 2. Użyj funkcji `itertools.product()`
# 3. Uruchom doctesty - wszystkie muszą się powieść
# %% Example
# >>> result
# [('Alice', 'Apricot', 'alice@example.com'),
# ('Alice', 'Apricot', 'bob@example.com'),
# ('Alice', 'Apricot', 'carol@example.com'),
# ('Alice', 'Banana', 'alice@example.com'),
# ...,
# ('Carol', 'Corn', 'bob@example.com'),
# ('Carol', 'Corn', 'carol@example.com')]
# %% Doctests
"""
>>> import sys; sys.tracebacklimit = 0
>>> assert sys.version_info >= (3, 9), \
'Python 3.9+ required'
>>> assert result is not Ellipsis, \
'Assign result to variable: `result`'
>>> assert type(result) is product, \
'Variable `result` has invalid type, should be product'
>>> result = list(result)
>>> from pprint import pprint
>>> pprint(result, width=72, sort_dicts=False)
[('Alice', 'Apricot', 'alice@example.com'),
('Alice', 'Apricot', 'bob@example.com'),
('Alice', 'Apricot', 'carol@example.com'),
('Alice', 'Banana', 'alice@example.com'),
('Alice', 'Banana', 'bob@example.com'),
('Alice', 'Banana', 'carol@example.com'),
('Alice', 'Corn', 'alice@example.com'),
('Alice', 'Corn', 'bob@example.com'),
('Alice', 'Corn', 'carol@example.com'),
('Bob', 'Apricot', 'alice@example.com'),
('Bob', 'Apricot', 'bob@example.com'),
('Bob', 'Apricot', 'carol@example.com'),
('Bob', 'Banana', 'alice@example.com'),
('Bob', 'Banana', 'bob@example.com'),
('Bob', 'Banana', 'carol@example.com'),
('Bob', 'Corn', 'alice@example.com'),
('Bob', 'Corn', 'bob@example.com'),
('Bob', 'Corn', 'carol@example.com'),
('Carol', 'Apricot', 'alice@example.com'),
('Carol', 'Apricot', 'bob@example.com'),
('Carol', 'Apricot', 'carol@example.com'),
('Carol', 'Banana', 'alice@example.com'),
('Carol', 'Banana', 'bob@example.com'),
('Carol', 'Banana', 'carol@example.com'),
('Carol', 'Corn', 'alice@example.com'),
('Carol', 'Corn', 'bob@example.com'),
('Carol', 'Corn', 'carol@example.com')]
"""
# %% Run
# - PyCharm: right-click in the editor and `Run Doctest in ...`
# - PyCharm: keyboard shortcut `Control + Shift + F10`
# - Terminal: `python -m doctest -v myfile.py`
# %% Imports
from itertools import product
# %% Types
result: product
# %% Data
FIRSTNAMES = ['Alice', 'Bob', 'Carol']
LASTNAMES = ['Apricot', 'Banana', 'Corn']
EMAILS = ['alice@example.com', 'bob@example.com', 'carol@example.com']
# %% Result
result = ...