{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "69c92d0b",
   "metadata": {},
   "outputs": [],
   "source": [
    "range(0,40)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2a74bbda",
   "metadata": {},
   "outputs": [],
   "source": [
    "list(range(0,40))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e557ac47",
   "metadata": {},
   "outputs": [],
   "source": [
    "list(range(1,41))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "5fcb09b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=set([x for x in range(1,41) if x%2==0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "20316498",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "c0ea4579",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=set([x for x in range(1,41) if x%3==0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "b8441bbc",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "4cd65fd5",
   "metadata": {},
   "outputs": [],
   "source": [
    "b=set([x for x in range(15,61) if x%6==0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "adc5fe3e",
   "metadata": {},
   "outputs": [],
   "source": [
    "c=set([x for x in range(29,51) if x%7==0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "4ab84c70",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(a)\n",
    "print(b)\n",
    "print(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "158b8c56",
   "metadata": {},
   "outputs": [],
   "source": [
    "a.union(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "69b52842",
   "metadata": {},
   "outputs": [],
   "source": [
    "a.union(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "c9bd2846",
   "metadata": {},
   "outputs": [],
   "source": [
    "d=a.difference(b.union(c)).union(b.difference(a.union(c))).union(c.difference(b.union(a)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "54a7ebaa",
   "metadata": {},
   "outputs": [],
   "source": [
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "0edaaae1",
   "metadata": {},
   "outputs": [],
   "source": [
    "len(d)"
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 5
}
