top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Python Lists

Writer's picture: Ibrahim RustemovIbrahim Rustemov


Lists are most used datatype in Python which can be written as a list of comma-separated values. Lists are created using square brackets.


List items are ordered, changeable, and allow duplicate values.

List items are indexed, the first item has index 0 , the second item has index 1 etc.



If we want to get number of items in the list then we can use len() function.


Lists could store multiple data types both at the same time and separately.

Multiple Dtypes

Multiple Dtypes at the same list

As we see in one list we can store multiple data types in one list. And it makes python lists more dynamics and slow.

And Python Lists lists have various functions

append()


Via append function we can add value to the end of list in each type.

In this section we apply append function for finding fibonacci numbers.


reverse()

Using reverse function we can reverse the order of our elements.

sort()

sort function is used for sorting each element in ascending (or descending) order in list. If we define reverse=True between the brackets function will sort values in descending oreder.

index()


Sometimes we can look for some value in the list. However, we don't know the exact index of this value. to find that we use index function.

In Conculusion:

In this blog, we got acquainted with List. And introduced some of the features of List but the functionality of the lists is very wide.

I hope this blog will be helpfull for you. If you want to look at full code you can click here

0 comments

Recent Posts

See All

Comments


COURSES, PROGRAMS & CERTIFICATIONS

 

Advanced Business Analytics Specialization

Applied Data Science with Python (University of Michigan)

Data Analyst Professional Certificate (IBM)

Data Science Professional Certificate (IBM)

Data Science Specialization (John Hopkins University)

Data Science with Python Certification Training 

Data Scientist Career Path

Data Scientist Nano Degree Program

Data Scientist Program

Deep Learning Specialization

Machine Learning Course (Andrew Ng @ Stanford)

Machine Learning, Data Science and Deep Learning

Machine Learning Specialization (University of Washington)

Master Python for Data Science

Mathematics for Machine Learning (Imperial College London)

Programming with Python

Python for Everybody Specialization (University of Michigan)

Python Machine Learning Certification Training

Reinforcement Learning Specialization (University of Alberta)

Join our mailing list

Data Insight participates in affiliate programs and may sometimes get a commission through purchases made through our links without any additional cost to our visitors.

bottom of page