Python Data Types
Python Data Types
1
Python Data types
2
Python Data types
1. • Numbers
2. • String
3. • List
4. • Tuple
5. • Dictionary
3
Numbers
4
Strings
5
Printing a Character or Set of Characters
within a String
Output:
6
Lists
List is a frequently used data type in Python.
7
Accessing Values in a List
Example:
Output:
8
Tuples
9
Tuples..
Tuple is putting different comma-separated values between
parentheses().
ex: tuple1 = (1, “abc”, 2.6, „a‟)
10
Accessing Values in a Tuple
Example:
Output:
11
Dictionary
Python dictionary is an unordered collection of items that has a key:
value pair.
Values can be of any data type and can repeat and keys must be
unique.
12
Accessing Values in a Dictionary
Example:
Output:
13
Lesson Summary
14
Thank You.
15