Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

Hey friends can u please explain this...

OpenStudy (anonymous):

Can u please tell me about all these datatypes in Python

OpenStudy (anonymous):

can any python learner help me in that

OpenStudy (anonymous):

if problem with the .doc file , I can attach a notepad file or a .html file. Just let me know

OpenStudy (anonymous):

I don't think it is necessary to cover all of the data types, so I will give detailed descriptions for the most important ones to a beginner in python. Integer (abbreviated int) is basically any integer, meaning it has no decimal places. So, 100 is data of type integer, but 100.1 is not. Float is any number with a floating point decimal. This means 100.1 is of type float, but 100 is not. Character String (called a string, abbreviated str) is any sequence of characters, words basically. For example "Hello world" is data of type string. A string is essentially a list of characters, so lets say str = "hello", in this case str[0] is h, str[1] is e, str[2] is l (Remember, counting in computer science starts at 0). Since a string is a list of characters, then a list can be a list of anything, such as numbers. for example: list = [1, 2, 3, 4, 5, 6]. This creates a list, that stores the integers of 1-6. To access 1, you would use list[0]. Tuples are basically lists, but they are immutable, meaning they cannot be changed by anything but the programmer. A dictionary is essentially an unordered set key:value pairs, but the keys have to be unique within each dictionary. A file is a file, like a text file or a python file.

OpenStudy (anonymous):

please explain me all of those data types which are left

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!