How to declare array in Python?

0 votes
Is there Array in Python? How can we implement it?
Nov 20, 2018 in Python by Jino
• 5,560 points
78 views

1 answer to this question.

0 votes

In Python "list" is the class that can be used as Array and also reference them.

here in python you don't declare things you just use it. Here is how to use array: 

arr = []        #blank array

arr = [1,2,3]    

arr = [1, "abc"]

answered Nov 20, 2018 by Nabarupa

Related Questions In Python

+4 votes
7 answers
+3 votes
2 answers

how to print array integer without [] bracket in python like result = 1,2,3,4,5

Hey @abhijmr.143, you can print array integers ...READ MORE

answered Aug 4, 2018 in Python by Omkar
• 67,520 points

edited Aug 8, 2018 by Omkar 687 views
0 votes
1 answer

How to save Numpy array as image in python?

If you have matplotlib, you can do: import ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,520 points
1,660 views
0 votes
2 answers

How to declare constants in python?

In python we don't require to declare ...READ MORE

answered Aug 18 in Python by anonymous
• 460 points
19 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 238 views
+2 votes
11 answers
0 votes
1 answer

How to split a string to array in Python?

This way you can split your string ...READ MORE

answered Mar 4 in Python by Priyaj
• 56,540 points
54 views