Course Content
What is Python?
Introduction of Python and Its setup
0/2
Control Statement
Control statements are used to control the flow of execution depending upon the specified condition/logic.
0/4
File Handling
File handling is an important component of any application. Python has multiple functions for creating, reading, updating, and deleting files.
0/2
Examples
Following are the examples of python scripts to try hands-on, you are ready to start your python journey.
0/7
Python
About Lesson

A list is created by placing all the elements inside square brackets [] and separated by commas (,).

Example:

numbers = [1, 2, 3, 4]
print(numbers)

words = ['five', 'six']
print(words)

mixed = [1, 2, 'three', 4, 5, 'six', 7.0, 8.0]
print(mixed)
Function Description
list.append() Add an item at end of a list
list.extend() Add multiple items at the end of a list
list.insert() insert an item at a defined index
list.remove() remove an item from a list
del list[index] delete an item from a list
list.clear() empty all the list
list.pop() remove an item at a defined index
list.index() return index of the first matched item
list.sort() sort the items of a list in ascending or descending order
list.reverse() reverse the items of a list
len(list) return total length of the list
max(list) return item with maximum value in the list
min(list) return item with the minimum value in the list
list(seq) converts a tuple, string, set, dictionary into a list