Computer programs work with data.a datatype is a set of value,and the allowable operation on those values.the following list of python datatype.
In python programming language integer numbers,floating point numbers,and complex numbers,the following example count the total no of pen using number datatype.
box = 10; pen_in_box = 32; total = box * pen_in_box; print "Total Pen",total,"In All Box";
In python programming language,the boolean datatype is a primitive datatype having one of two values:True or False.this fundamental datatype.very common in computer programs.the following example of boolean data type in python programming.
a = True b = False
String a data type representing textual data in computer programs.the string is most important datatype in python programming.
String in python can be created using single quotes,double quotes,and triple quotes.when we use triple quotes,string can span sevral lines without using escape character.
website = "Veewom"; print(website);
A tuple is an immutable sequence datatype.the tuple can contain data types.tuple are created uisng round brackets.
The following example of tuple in python it contain more than one data into a single variables look like this example.
one = (1,2,3,4,5); two = (6,7,8,9,10); print(len(one)); print(min(one)); print(max(one)); print(len(two)); print(min(two)); print(max(two));
A list is a mutable sequence datatype.the list can contain mixed datatype.a list and a tuple share many common features.because a list is a modifiable datatype.it has some additional operations.
items = ["Mouse","Keyboard","LED Display"]
A set an unordered collection of data with no duplicate elements.a set supports operations like union intersection,or difference.similar as mathematics.