Locked learning resources

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

Unlock This Lesson

Locked learning resources

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

Unlock This Lesson

Convert a Python String to int (Summary)

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
Avatar image for jamesbrown68

jamesbrown68 on May 20, 2020

Thanks for a useful course.

Avatar image for gaurangpopat

gaurangpopat on May 20, 2020

Short and Sweet!

Avatar image for pommez

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!

Avatar image for mahlenius

mahlenius on July 16, 2020

Thanks much, good refresher, especially about using the ‘f’ formatted string.

Become a Member to join the conversation.