1 / 7

Data Types in Python part-3

This Presentation will guide through Data Types in Python and discuss on List Data Type in Python, Tuple Data Type in Python, Set Data Type in Python and Dictionary Data Type in Python.

Download Presentation

Data Types in Python part-3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Types in Python Swipe

  2. Data Types in Python Fundamentals Derived Suite Integers List Numbers Float Tuple Complex Range Sequence Boolean Bytes String Bytes Arrays Sequence None Set Frozen Set Mapping Dictionary

  3. List Data Type in Python Lists are just like the arrays, declared in other languages which is an ordered collection of data. It is very flexible as the items in a list do not need to be of the same type. Creating List:- Lists in Python can be created by just placing the sequence inside the square brackets[].

  4. Tuple Data Type in Python Just like list, tuple is also an ordered collection of Python objects. The only difference between type and list is that tuples are immutable. Tuples cannot be modified after it is created. It is represented by tuple class. In Python, tuples are created by placing a sequence of values separated by ‘comma’ with or without the use of parentheses for grouping of the data sequence. Tuples can contain any number of elements and of any datatype (like strings, integers, list, etc.).

  5. Set Data Type in Python In Python, Set is an unordered collection of data type that is iterable, mutable and has no duplicate elements. The order of elements in a set is undefined though it may consist of various elements. Sets can be created by using the built-in set() function with an iterable object or a sequence by placing the sequence inside curly braces, separated by ‘comma’. Type of elements in a set need not be the same, various mixed-up data type values can also be passed to the set.

  6. Dictionary Data Type in Python Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair. Key-value is provided in the dictionary to make it more optimized. Each key-value pair in a Dictionary is separated by a colon :, whereas each key is separated by a ‘comma’.

  7. Topics for next Post Type Casting/Type Conversion in Python Mutable vs Immutable Data type in Python Stay Tuned with

More Related