Professional Documents
Culture Documents
Lecture 7-8
Lecture 7-8
Lecture 7-8
Lecture 7-8
Dictionaries, modules & packages
List can be represented Tuple can be represented Set can be represented Dictionary can be
by [ ] by ( ) by { } represented by { }
list can be created Tuple can be created Set can be created Dictionary can be created
using list() function using tuple() function. using set() function using dict() function.
Applications of List, Set, Tuple, and Dictionary
List:
• Used in JSON format
• Useful for Array operations
• Used in Databases
Tuple:
• Used to insert records in the database through SQL query at a
time
Ex: (1.’sravan’, 34).(2.’geek’, 35)
• Used in parentheses checker
Set
• Finding unique elements
• Join operations
Dictionary
• Used to create a data frame with lists
• Used in JSON
Modules and Packages