Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Convert a Python String to int (Summary)

Give Feedback

Congratulations! You’ve learned so much about integers and how to represent and convert them between Python string and int data types.

In this course, you learned how to:

  • Use str and int to store integers
  • Specify an explicit number system for an integer representation
  • Convert a Python string to an int
  • Convert a Python int to a string

Now that you know about str and int, you can learn more about representing numerical types using float(), hex(), oct(), and bin()!

Download

Course Slides (.pdf)

266.0 KB

Comments & Discussion

jamesbrown68 on May 20, 2020

Thanks for a useful course.

gaurangpopat on May 20, 2020

Short and Sweet!

pommez on May 25, 2020

that is why python is great: even if you think you already know about a topic, you end up learning new awesome features. In this case, for me it was the type representation using the colon notation here: f"{value:b}" … so cool!

Become a Member to join the conversation.