for i in range(9): for j in range(9): print("self.B"+str(i)+"_"+str(j)+".clicked.connect(self.put_num)")