# Python Program to convert List of Integer to List of String

## Python Program to convert List of Integer to List of String

Given a List of Integers. The task is to convert them to List of Strings.

Examples:

```Input: [1, 12, 15, 21, 131]
Output: ['1', '12', '15', '21', '131']

Input: [0, 1, 11, 15, 58]
Output: ['0', '1', '11', '15', '58']
```

Method 1: Using `map()`

 `# Python code to convert list of ` `# string into sorted list of integer ` `   ` `# List initialization ` `list_int ``=` `[``1``, ``12``, ``15``, ``21``, ``131``]` `   ` `# mapping ` `list_string ``=` `map``(``str``, list_int) ` `   ` `# Printing sorted list of integers ` `print``(``list``(list_string))`

Output:

```['1', '12', '15', '21', '131']
```

Example 2: Using list comprehension

 `# Python code to convert list of  ` `# string into sorted list of integer ` `   ` `# List initialization ` `list_string ``=` `[``1``, ``12``, ``15``, ``21``, ``131``]` `   ` `# Using list comprehension ` `output ``=` `[``str``(x) ``for` `x ``in` `list_string]` `   ` `# Printing output ` `print``(output)`

Output:

```['1', '12', '15', '21', '131']
```

Method 3: Using iteration

 `# Python code to convert list of ` `# string into sorted list of integer ` `   ` `# List initialization ` `list_string ``=` `[``1``, ``12``, ``15``, ``21``, ``131``]` `   ` `   ` `list_int ``=` `[]` `# using iteration and sorted() ` `for` `i ``in` `list_string:` `    ``list_int.append(i)` `   ` `# printing output ` `print``(list_int) `

Output:

`['1', '12', '15', '21', '131']`

Last Updated on March 1, 2022 by admin

## Get directory of current Python scriptGet directory of current Python script

Get directory of current Python script While working with file handling you might have noticed that files

## get_attribute() element method – Selenium Pythonget_attribute() element method – Selenium Python

get_attribute() element method – Selenium Python get_attribute() element method – Selenium Python Difficulty Level : Basic

## Detecting Multicollinearity with VIF – PythonDetecting Multicollinearity with VIF – Python

Detecting Multicollinearity with VIF – Python Multicollinearity occurs when there are two or more independent

## Q-Learning in PythonQ-Learning in Python

Q-Learning in Python Reinforcement Learning briefly is a paradigm of Learning Process in which a learning

## Simple registration form using Python TkinterSimple registration form using Python Tkinter

Simple registration form using Python Tkinter Python provides the Tkinter toolkit to develop GUI applications.

## Python: os.path.abspath() method with examplePython: os.path.abspath() method with example

Python: os.path.abspath() method with example OS module in Python provides various methods for interacting with the

## Pandas Series.to_frame()Pandas Series.to_frame()

Python | Pandas Series.to_frame() Pandas series is a One-dimensional ndarray with axis labels. The labels

## os.getpid() method – Pythonos.getpid() method – Python

Python | os.getpid() method OS module in Python provides functions for interacting with the operating system.