题解 | #十六进制转十进制#
十六进制转十进制
http://www.nowcoder.com/practice/33e148570d5c4e728116e2f861638c9c
sumcc = 0 BoBo_list = ['A','B','C','D',"E","F"] BoBo_list.reverse() for count,i in enumerate(BoBo_list): factor = 10+ord(i)-65 sumcc += pow(16,count)*factor print("{:15d}".format(sumcc))