Introduction to Lists
So far this book has shown four types of data:
String (a string is short for “string of characters,” which normal people think of as text.)
Python can display what type of data a value is with the type function.
This type function isn’t useful for other programming in this book, but it is good to demonstrate the types of data introduced so far. Type the following into the interactive shell. (Don’t create a new window and type this in as a program; it won’t work.)
type(3)type(3.145)type("Hi there")type(True)>>> type(3)<class 'int'>>>> type(3.145)<class 'float'>>>> type("Hi there") ...