how do I check the length of an array in a python program

0 votes
what is the most efficient way to find out the length of an array in a python program?
Mar 12, 2019 in Python by Waseem
• 4,540 points
1,226 views

1 answer to this question.

0 votes
lets say we have a list

mylist = [1,2,3,4,5]

len(mylist)

this will give you the length of the array.
answered Mar 12, 2019 by Mohammad
• 3,230 points

Related Questions In Python

+1 vote
1 answer
0 votes
1 answer

How do I convert type of an array in python?

Use the following command to change the ...READ MORE

answered May 24, 2019 in Python by Kishore
1,096 views
0 votes
1 answer

How do I trim the leading or trailing zeros from a 1d array in python?

Hey @Akki, you can use the numpy ...READ MORE

answered May 29, 2019 in Python by Wakir
1,739 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,464 views
0 votes
1 answer
0 votes
1 answer

How can I find the square of a number in python?

You can use the exponentiation operator or ...READ MORE

answered May 21, 2019 in Python by Mohammad
• 3,230 points
1,262 views
0 votes
1 answer

how do i check for exceptions in python?

use self.assertRaises method as a context manager. def ...READ MORE

answered Mar 12, 2019 in Python by Mohammad
• 3,230 points
723 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