Advertisement
bdf74

Untitled

Nov 29th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. a = [ 1,2,3,5,"56", 6]
  2. for index, value in enumerate(a):
  3.     if type(value) is str:
  4.         a[index] = int(value)
  5.  
  6. print(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement