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 ▸

Sort a given input of lowercase letters alphabetically


Create an rock, paper, scissors game. The user should input one option, and the computer should play randomly.


Write a Python script to take a product name as input and then automatically google search reviews for it and open the top 3 search results in different tabs


What's the difference between a local and a global variable?