TristanSld

issubset and issuperset methods in sets

Jan 16th, 2014
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. a=set([0,1,2,3])
  4. b=set([0,1,2,3,4,5,6])
  5. print a.issubset(b) or a <= b, "\n"  # a kümesi b kümesinin alt kümesi midir?
  6. print a.issuperset(b) or a >= b # a kümesi b kümesini kapsar mı?
RAW Paste Data