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 ▸

How do you define a class in python


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


What is the difference between a for loop and a while loop.


Write a recursive function that takes any integer n and prints the nth Fibonacci number.