Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coding: utf-8
- from math import *
- def getSumOfLastDigits(numList):
- number = ""
- #length = 0
- total = 0
- for i in numList:
- number = str(i)
- #length = int(len(number)-1)
- #total += int(number[length:])
- total += int(number[-1])
- print total
- getSumOfLastDigits([2,4,13,25,114,345,1238])
Add Comment
Please, Sign In to add comment