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,820 points
1,532 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 21, 2018 by Nabarupa

Related Questions In Python

+4 votes
7 answers
0 votes
1 answer

How to declare an array in Python?

variable = [] Now variable refers to an empty list*. Of ...READ MORE

answered Jan 5 in Python by Gitika
• 65,950 points
635 views
+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 5, 2018 in Python by Omkar
• 69,170 points

edited Aug 8, 2018 by Omkar 6,159 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
7,491 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,421 views
0 votes
0 answers
+1 vote
12 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, 2019 in Python by Priyaj
• 58,140 points
3,924 views