Logo

Programming-Idioms

  • Scheme
  • Python

Idiom #258 Convert list of strings to list of integers

Convert the string values from list a into a list of integers b.

b = [*map(int, a)]
b = [int(elem) for elem in a]
System.Linq;
var b = a.Select(i => int.Parse(i)).ToList();

New implementation...