I am working on the code to input the numbers in the string self.EPG_DIGIT_NUMBER when I'm pressing on the keyboard number buttons. I would like to add the empty string like this in each time when I press on the keyboard number buttons.
DIGIT_BUTTONS = range(58, 68)
if action.getId() in DIGIT_BUTTONS:
EPG_DIGIT_NUMBER = len(self.EPG_DIGIT)
if EPG_DIGIT_NUMBER <= 2:
self.EPG_DIGIT_NUMBER += str(action.getId() - 58)
self.EPG_DIGIT += 1
self.getControl(413).setLabel('[B]' + self.EPG_DIGIT_NUMBER + '[/B]')
When I press on the keyboard numbers 1,0,3, it will show 103 in the string. What I want to achieve is when I press on the keyboard number buttons 1,0,3, I want to make the string to show something is like: 1 0 3. How I can do that?
'\t'.join(str(123))103I would like to make it get seperate which make it to show something is like1 0 3. How I can do that?' '.join(list("103"))?1, so I press on the 0 button of the keyboard to make it to show10. I want to make the space string which show1 0and when I press 3 button on the keyboard to make to show1 03so I want to make the space to make it to show1 0 3. How I can do that??self.EPG_DIGIT_NUMBER += (str(action.getId() - 58)+' '), right?