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

1414 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Whats the output of "for i in "hello world": print(i)" and why/how is this achieved


When to use a dectionary or a list


Write a python function that takes a string as parameter and returns the character in the string with the most occurrences, along with the number of times this character occurs


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


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences