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 ▸

What are the main data structures that I can use in Python


Sort a given input of lowercase letters alphabetically


Generate an array of integers from 0 to 99 and split it into two smaller arrays. Each smaller array will contain half of the original.


Implement a fibonacci function which calculates the nth number of the fibonacci sequence.