The standard library has a good selection of functions for working with containers and sequences, for numeric, boolean, and other uses.
- [Instructor] The Python standard library provides…some useful functions for working with containers.…So here in Komodo, I've opened a working copy of…hello.py from chapter 13 of the exercise files,…and I'm just going to start by declaring a tuple,…and I'm going to assign y equals x, and print both of them.…When I run this,…you see we get two copies of the same tuple.…
Now, I can say y equal len of x, l-e-n.…That will give me the length of x,…and you see the y is now the number five.…I can say, y equals reversed…of x, so this will provide me with an iterator,…so when I print it,…we get this reversed object string.…On the other hand, I can create a list out of that,…and that will give me a reversed list…of the tuple in x,…or I could use reversed directly if I wanted to…in a four.…
I could say four, i in y,…print i.…print i.…And you could see we got five, four, three, two, one,…a reversed list.…a reversed list.…There is a sum function.…When I run that, you notice I get the number 15,…which is the sum of one, two, three, four, and five.…
- Python anatomy
- Types and values
- Conditionals and operators
- Building loops
- Defining functions
- Python data structures: lists, tuples, sets, and more
- Creating classes
- Handling exceptions
- Working with strings
- File input/output (I/O)
- Creating modules
- Integrating a database with Python db-api
Skill Level Intermediate
Python: Programming Efficientlywith Michele Vallisneri2h 15m Intermediate
2. Language Overview
3. Types and Values
8. Structured Data
11. String Objects
12. File I/O
13. Built-in Functions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.