Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def convertToInteger(stringID):
  2. id = [0, 1, 2, 3, 4, 5, 6]
  3.  
  4. stringId = '0123456'
  5. [int(x) for x in stringId]
  6. => [0, 1, 2, 3, 4, 5, 6]
  7.  
  8. map(int, stringId)
  9. => [1, 2, 3, 4, 5, 6]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement