Print Array in Python

Print array in python. A Python program to print the string as an array. In this program, we can print the array as a string in the result. The string is an immutable sequence data type in Python. It’s a string of Unicode characters enclosed by single, double, or triple quotations. If a string literal requires double quotes to be included as part of the string, it should be enclosed in single quotes.

a = "Welcome to inlarn.com"
print(a[1])

Output:

Welcome to inlarn.com

Array in Python

Arrays in Python are a type of data structure similar to lists. They include a variety of items that can be of various data kinds. Furthermore, Python arrays can be iterated and include a variety of built-in methods for dealing with them. A Python Array is a collection of common data structures with components of the same type. 

It is used to store data collections. Arrays are handled via the “array” module in Python programming. When you use the array module to build arrays, the array members must all be of the same numeric type.