Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
lst assigning values list lst

Lst assigning values list lst

Web Development > Python Developer's Handbook > 2. Language Review > Data Structures

See All Titles

Make Note | Bookmark

Python implements a variety of data structures, such as lists, tuples, ranges, and dictionaries (also known as

hash tables).

>>> lst = [1,2,3,4] # this is simple list

A list can have elements of different data types:

range of elements from a list.

>>> lst = [1, "ni!", [1, 2, 3, 4, "Albatross!!", 3]]

Let's see some examples of operations that can be applied to a list.

Identifying an Entry

>>> lst = ["p", "a", "r", "r", "o", "t"]
>>> lst[1:4] = ["aaaaaaaaaaaaa", "rrr", "rrrr"] >>> lst
["p", "aaaaaaaaaaaaa", "rrr", "rrrr", "o", "t"]

Inserting Values

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Kayla Lynn

PageId: DOCB22FBE1