Skip to content

Instantly share code, notes, and snippets.

@AndersDeleuran
Last active December 28, 2015 16:19
Show Gist options
  • Save AndersDeleuran/7528604 to your computer and use it in GitHub Desktop.
Save AndersDeleuran/7528604 to your computer and use it in GitHub Desktop.
foo = ["060X","059B","59","1"]
for i,item in enumerate(foo):
if len(item) == 2:
foo[i] = "0" + item
elif len(item) == 1:
foo[i] = "00" + item
print foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment