python pattern program to print K

visit shbcf.ru