Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def toNumbers(strList):
- sum = 0
- strList[:]= (ord(ch)-96 for ch in strList)
- print(strList)
- def main():
- print("Modifies each entry in the list by converting it to a number.")
- strList = [ "d", "t", "c"]
- nums= toNumbers(strList)
- main()
Add Comment
Please, Sign In to add comment