Convert a list of int to string Python | Example code

Use the string lower() method inside a for loop to convert a list of int to string in Python.

Let’s convert a list of int to string Python

Simple Python example code.

list1 = ["P", "Q", "R"]

for i in range(len(list1)):
    list1[i] = list1[i].lower()

print(list1)

Output:

Convert a list of int to string Python

Another Example

Convert each string to lowercase

strList = ["AA", "BB", "CC"]

strList = [x.lower() for x in strList]

print(strList)

Output:

[‘aa’, ‘bb’, ‘cc’]

Do comment if you have any doubts and suggestions on this Python list int topic

Note: IDE: PyCharm 2021.1.3 (Community Edition)

Windows 10

Python 3.7

All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.