The Python standard library provides a number of useful functions for working with numbers and numeric data.
- [Instructor] The Python Standard Library provides…a rich set of built-in functions for working with numbers.…Here in Komodo I've opened a working copy of types.py…from chapter 13 of the exercise files.…And you notice here down on line four,…we're initializing x with a literal string…with the digits four and seven in them,…and then I'm using the int function…and what's interesting about the int function is it's…actually not a function it's a constructor for the int type…and it'll return an int from another type.…
And so when I run this, you'll notice that…we're printing out down here on line seven,…we're printing the type of x and the value of x…and the type of y and the value of y…and we see that x is a string and y is an int.…And so we're converting a string to an int by calling…the int function which is actually the int constructor.…Likewise there is a float constructor…and when I run this you'll notice that our result y is 47.0…'cause that's the standard way to represent…a floating number with a decimal point…
- 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.