Convert a list of integers to list of strings

teratoulis

I am trying to convert a list with integers values in a list with strings

a=[[1, 2, 4, 3, 2, 1]]

And I would like to get something like that

b=[['1', '2', '4', '3', '2', '1']]
raffaele spinoni

Supposing you are talking about python, here is the solution:

b = [str(int) for int in a]

Notice that this will work if a is a list, from your question it seems that you are dealing with a list of list (given the double square brackets)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Convert list of strings into list of integers

convert a list of strings list into integers

Convert a list of strings to a list of integers

Convert array of Strings to list of Integers?

Convert list of strings into tuple of integers

Convert a list of strings of lists to a list of integers

convert list of strings from file to list of integers

How to convert list of strings to list of integers?

Pandas convert column where every cell is list of strings to list of integers

In PyParsing, how to define a setParseAction function to convert a list of strings to a list of integers?

Convert a list of strings containing list-of-integers into an array

Trying to use list comprehension to convert list of strings to integers?

searching a list of strings for integers

List of strings to array of integers

flatMap a list of strings to a list of integers

Convert a list into a list of strings

Pandas - Convert strings in a list to integers using a dictionary and sum values

How to convert a list of strings representing tuples to tuples of integers?

Convert integers inside a list into strings and then a date in python 3.x

How to convert nested list strings to integers then sort them in python 3?

How do I convert a list of strings to integers in Python

Convert a list of integers to string

Convert a number to a list of integers

list containing integers and strings in python

Slice list of paired strings and integers

How to covert this list of strings into integers

Separating Integers and Strings From a List

Identifying integers from a list with strings and integers

Python converting list of strings to list of integers