I have a counter:
count = []
def count_up(digit_1, digit_2, digit_3, digit_4, digit_5, digit_6, digit_7):
if(tick = True):
count = []
digit_1 = digit_1 + 1
if(digit_1 == 27):
digit_1 = 0
digit_2 += 1
if(digit_2 == 27):
digit_2 = 0
digit_3 += 1
if(digit_3 == 27):
digit_3 = 0
digit_4 += 1
if(digit_4 == 26):
digit_4 = 0
digit_5 += 1
if(digit_5 == 26):
digit_5 = 0
count.append(digit_1)
count.append(digit_2)
count.append(digit_3)
count.append(digit_4)
count.append(digit_5)
print count
count = []
and I want to change each digit in the list to the corresponding letter (1 = a, 26 = z)
I have tried .replace() but it comes up with:
File "/Users/Johnpaulbeer/pythonpractice/test.py", line 99, in >count_decoder count = [w.replace(1, 'a') for w in count] AttributeError: 'int' object has no attribute 'replace'
What else can I do, or if not then how do I change the integer into a string?
dict()with alist()?