PYTHON: Python Programming: Programming Guide For Beginners: LEARN IN A DAY! (Python Programming, Javascript, App Design, PHP, SQL, Python) by Os Swift

PYTHON: Python Programming: Programming Guide For Beginners: LEARN IN A DAY! (Python Programming, Javascript, App Design, PHP, SQL, Python) by Os Swift

Author:Os Swift
Language: eng
Format: azw3, epub
Published: 2015-04-27T07:00:00+00:00


Basic List operations

Just like the string, lists can be subjected to the + and * operators for concatinating and repeating the items. The only difference is that, a new list is obtained as a result instead of a string.

Similarly, lists can be subjected to the sequence operations just as in the strings.

Built-in functions

The following are the list functions supported by Python:

1.cmp(list1, list2)

This function is used for comparing the items of two lists.

2.len(list)

This function is used for obtaining the list’s length.

3.max(list)

This function is used for returning the element that has the maximum value in the list.

4.min(list)

This function is used for returning the element that has the maximum value in the list.

5.list(seq)

A tuple can be converted into a list using this function.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.