Lists(built-in functions, list comprehension, Concatenation, examples and programs) in python.

Contents of this blog: Python lists.Built-in list functions.Accept list elements from user.List comprehension.List concatenation. A variable can store only one value at a time, but lists are built in data types which can store multiple values. a=[1,2,3] 1,2 and 3 are list items. They have different positions in the list called index. Indexing start from…… Continue reading Lists(built-in functions, list comprehension, Concatenation, examples and programs) in python.

Matrices using lists in python.

Contents of this blog: Matrix in python: list.Accepting list elements from user. Matrix is nothing but 2D lists, containing rows and columns. Elements in the 2D lists have positions(index). a=[[1,2,4],[2,4,7],[1,9,7]] is an example of 2D list. Column➡row ⬇01201(0,0)2(0,1)4(0,2)12(1,0)4(1,1)7(1,2)21(2,0)9(2,1)7(2,2) Row is denoted by i and columns are by j. So now , a[i][j] is the elements…… Continue reading Matrices using lists in python.

Design a site like this with WordPress.com
Get started