# coding: utf-8 import sys, codecs def test_in(a, b): print a, "in", b, "?", (a in b) def utf8upper(x): return codecs.decode(x, "utf-8").upper() dragonfly = "Стрекоза" goat = "Коза" test_in(goat.upper(), dragonfly.upper()) test_in(utf8upper(goat), utf8upper(dragonfly))