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

Related Python Mentoring answers

All answers ▸

Use recursion to print all the sublists of a given list


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


What does __init__ mean?


Give a segment of python code that will print the numbers 1 to 7, each one on a new line