Convert a Python String to int – Real Python
Integers are whole numbers. In other words, they have no fractional component. Two data types you can use to store an integer in Python are int and str. These types offer flexibility for working with integers in different circumstances. In this course, you’ll learn how you can convert a Python string to an int. You’ll also learn how to convert an int to a string.
By the end of this course, you’ll understand how to:
- Store integers using
strandint - Convert a Python string to an
int - Convert a Python
intto a string
What’s Included:
- 5 Lessons
- Video Subtitles and Full Transcripts
- 1 Downloadable Resource
- Accompanying Text-Based Tutorial
- Q&A With Python Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths:
With 20 years as a teacher of music technology, Darren is keen to bring his skills to the Python table.
Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:
