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 ▸

When to use a dectionary or a list


Write a recursive function to return the nth Fibonacci number in Python


Use recursion to print all the sublists of a given list


How could I write a program to convert Km/h to m/s in python