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
2,276 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, 2021 in Python by Gitika
• 65,770 points
1,302 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,220 points

edited Aug 8, 2018 by Omkar 8,150 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,560 points
8,950 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 4,434 views
0 votes
1 answer
+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,020 points
5,085 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP