Which four data types are used in Python? Can you give an example of each?

In Python we use Strings, Integers, Floats and Booleans.String - text e.g. "Hello World"Integer - whole number e.g. 5Float - decimal number e.g. 2.8Boolean - binary value e.g. True, False

ES
Answered by Emilia S. Python tutor

1576 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

When to use a dectionary or a list


Write a function that takes a string, and outputs that string formatted in camelcase. (alternating upper and lower case for each character, e.g. cAmElCaSe)


How do I check if a number is prime using a python program?


When do we use a for-loop and when a while-loop?


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

MyTutor is part of the IXL family of brands:

© 2025 by IXL Learning