Is a group of data elements that are put together
under one name
Defines a particular way of storing and organizing
data in a computer so that it can be used efficiently
List
Tuples
The document discusses lists in Python. It begins by defining lists as mutable sequences that can contain elements of any data type. It describes how to create, access, manipulate, slice, traverse and delete elements from lists. It also explains various list methods such as append(), pop(), sort(), reverse() etc. and provides examples of their use. The document concludes by giving some programs on lists including finding the sum and maximum of a list, checking if a list is empty, cloning lists, checking for common members between lists and generating lists of square numbers.
The document provides information about the course GE3151 Problem Solving and Python Programming. It includes the objectives of the course, which are to understand algorithmic problem solving and learn to solve problems using Python constructs like conditionals, loops, functions, and data structures. It also outlines the 5 units that will be covered in the course, which include computational thinking, Python basics, control flow and functions, lists/tuples/dictionaries, and files/modules. Example problems and programs are provided for different sorting algorithms, quadratic equations, and list operations.
The document provides information on various list methods in Python like list creation, accessing items from lists, slicing lists, and common list methods like append(), count(), extend(), index(), insert(), pop(), copy(), remove(), reverse(), and sort(). It includes the syntax and examples to demonstrate how each method works on lists. Various programs are given to showcase inserting, removing, sorting, copying and reversing elements in lists using the different list methods.
The Ring programming language version 1.5.3 book - Part 22 of 184Mahmoud Samir Fayed
This document provides summaries of key features of lists in Ring programming language. Lists allow storing multiple values in a single variable. Key points include:
- Lists can be created using square brackets or : operator and items can be added or removed.
- Functions like len(), find(), sort(), reverse() etc. allow getting length, searching, sorting and reversing lists.
- Lists support nested structures and can be passed to and returned from functions.
- String indices can be used to access items in lists containing pairs of string and values.
- Lists provide a way to pass variable number of parameters to functions in a flexible order.
The Ring programming language version 1.10 book - Part 30 of 212Mahmoud Samir Fayed
This document discusses lists in Ring programming language. It covers creating, accessing, modifying lists as well as common list operations like sorting, searching, reversing etc. Lists can contain other lists, allowing for nested data structures. Key points include:
- Lists are created using square brackets or range operators. Items can be added or removed using functions like Add(), Del().
- The len() function returns the number of items in a list. Individual items can be accessed using their index in square brackets.
- Common operations include sorting with sort(), reversing with reverse(), searching with find().
- Lists are passed by reference, so functions can modify the original list. They also support string indices to access items.
The Ring programming language version 1.6 book - Part 24 of 189Mahmoud Samir Fayed
The Ring programming language supports defining functions that can return values, accept parameters, and call other functions recursively. Functions can also access global variables and local variables. Lists are a fundamental data type that can be sorted, searched, and manipulated. Functions can accept and return lists as parameters or return values.
This document provides information about data structures in Python. It discusses lists, tuples, sets, and dictionaries. For lists and tuples, it covers defining, indexing, slicing, unpacking, methods, built-in functions, and list comprehensions. Lists can contain heterogeneous elements and support methods like append(), pop(), sort(), and reverse(). Tuples are similar to lists but are immutable ordered sequences. They also support indexing, slicing, and unpacking. This document serves as a guide to working with common Python data structures.
• List is a collection, which is ordered and changeable. Allows duplicate members.
• Tuple is a collection, which is ordered and unchangeable. Allows duplicate members.
• Set is a collection, which is unordered and unindexed. No duplicate members.
• Dictionary is a collection, which is unordered, changeable and indexed. No duplicate members.
The document provides information about various Python data structures concepts related to lists. It discusses list basics like creating, accessing and updating lists. It also covers list methods like append(), pop(), sort() etc. and how to pass, return and search lists in functions. Key topics include list operations, looping through lists, copying lists, multidimensional lists and comparing performance of lists and tuples.
This document discusses lists in Python. It begins by defining lists as collections of items indexed from 0 to n-1, where n is the number of items. It then covers creating and initializing lists, accessing list items using indexes and slicing, updating and manipulating lists, adding and deleting items from lists, basic list operations, and important list methods. It provides examples for each topic and ends with some example programs involving lists like finding the largest/mean value in a list and linear search.
The document discusses lists in Python. Some key points:
- A list is a mutable ordered sequence of elements of any data type. Lists can be created using square brackets or the list() constructor.
- List elements can be accessed using indexes and sliced. Methods like append(), insert(), pop() etc. are used to modify lists.
- Lists support operations like membership testing, repetition, concatenation etc. Functions like len(), max(), min() etc. operate on lists.
- Lists can be passed to and returned from functions. List comprehension provides a concise way to create lists.
- Searching and sorting algorithms like linear search, binary search, bubble sort, selection sort can be
This document discusses lists and tuples in Python. It explains that lists are mutable containers that can hold heterogeneous data types and grow or shrink in size dynamically. Tuples are immutable containers that can also hold heterogeneous data types but have a fixed size after creation. The document covers how to define, access, slice, loop through and perform common operations on elements in lists and tuples. It also discusses built-in functions like len(), max(), min() that can operate on lists and tuples.
The document discusses various concepts related to lists in Python including:
- What lists are and their main properties like being ordered, containing arbitrary objects that can be accessed by index, and being nestable and mutable.
- Common list methods like insert(), remove(), sort(), etc.
- How to define and assign lists, access list elements, and modify lists.
- List slicing and how it allows accessing a subset of list elements.
- Passing lists to functions and how lists are mutable.
- Algorithms for generating prime numbers and sorting lists like selection sort.
- Basic searching algorithms like linear search and binary search and how they work.
- The concept of list
The document discusses Python lists, tuples, and dictionaries. It provides examples of how to create, access, modify, and loop through each of these data types. Lists are ordered and changeable collections that allow duplicate elements. Tuples are ordered and unchangeable collections that allow duplicate elements. Dictionaries are unordered collections of key-value pairs that do not allow duplicate keys. The document demonstrates various methods and operations available for each data type, such as appending and removing elements from lists, accessing elements by index in lists and tuples, and adding or modifying elements in dictionaries.
The document discusses Python lists and their key features. It covers how lists are ordered sequences that can contain elements of different types. Lists are mutable and can be accessed using indexes. Common list operations include slicing, concatenation, repetition, sorting, and using various list methods like append(), extend(), index(), reverse() etc. Tuples are immutable sequences similar to lists. Dictionaries are another data type that store elements as key-value pairs. The document also briefly introduces regular expressions for text parsing and extraction.
Lists are mutable data structures that can contain elements of different data types. Some key list operations include:
1. Creating lists using square brackets and separating elements with commas. Nested lists are also possible.
2. Common list methods like append(), pop(), insert() allow adding, removing and modifying list elements.
3. Slicing lists using start and end indexes allows extracting sublist elements. The step parameter advances through elements.
4. Built-in functions like len(), index(), count() provide useful information about lists.
Textbook Solutions refer https://pythonxiisolutions.blogspot.com/
Practical's Solutions refer https://prippython12.blogspot.com/
Contiguous memory locations are occupied to store data in memory, this structure of storing data is Array.
Introduction to Lists
Elementary Data Representation Different data structures, Operations on Data structures.
Python supports several data types including numbers, strings, and lists. Numbers can be integer, float, or complex types. Strings are collections of characters that can be indexed, sliced, and manipulated using various string methods and operators. Lists are mutable sequences that can contain elements of different data types and support operations like indexing, slicing, sorting, and joining. Common list methods include append(), insert(), remove(), pop(), clear(), and sort(). Tuples are similar to lists but are immutable.
Python supports several numeric and non-numeric data types including integers, floats, complex numbers, strings, lists, and tuples. Numbers can be integers, floats, or complex, and support common operations. Strings are immutable sequences of characters that can be indexed, sliced, formatted, and concatenated. Lists are mutable sequences that can contain mixed data types, and support common operations like indexing, slicing, sorting, and joining. Tuples are similar to lists but are immutable.
Preprocessing - Data Integration Tuple DuplicationVidhyaB10
Data integration:
Combines data from multiple sources into a coherent store
Integration helps to reduce and avoid redundancies and inconsistencies
Schema integration: e.g., A.cust-id B.cust-#
Integrate metadata from different sources
Major Tasks in Data Preprocessing - Data cleaningVidhyaB10
Data Preprocessing: An Overview
Data Quality
Major Tasks in Data Preprocessing
Data Cleaning
Measures for data quality: A multidimensional view
Accuracy: correct or wrong, accurate or not
Completeness: not recorded, unavailable, …
Consistency: some modified but some not, dangling, …
Timeliness: timely update
Believability: how trustable the data are correct
Interpretability: how easily the data can be understood
More Related Content
Similar to Python _dataStructures_ List, Tuples, its functions (20)
The Ring programming language version 1.5.3 book - Part 22 of 184Mahmoud Samir Fayed
This document provides summaries of key features of lists in Ring programming language. Lists allow storing multiple values in a single variable. Key points include:
- Lists can be created using square brackets or : operator and items can be added or removed.
- Functions like len(), find(), sort(), reverse() etc. allow getting length, searching, sorting and reversing lists.
- Lists support nested structures and can be passed to and returned from functions.
- String indices can be used to access items in lists containing pairs of string and values.
- Lists provide a way to pass variable number of parameters to functions in a flexible order.
The Ring programming language version 1.10 book - Part 30 of 212Mahmoud Samir Fayed
This document discusses lists in Ring programming language. It covers creating, accessing, modifying lists as well as common list operations like sorting, searching, reversing etc. Lists can contain other lists, allowing for nested data structures. Key points include:
- Lists are created using square brackets or range operators. Items can be added or removed using functions like Add(), Del().
- The len() function returns the number of items in a list. Individual items can be accessed using their index in square brackets.
- Common operations include sorting with sort(), reversing with reverse(), searching with find().
- Lists are passed by reference, so functions can modify the original list. They also support string indices to access items.
The Ring programming language version 1.6 book - Part 24 of 189Mahmoud Samir Fayed
The Ring programming language supports defining functions that can return values, accept parameters, and call other functions recursively. Functions can also access global variables and local variables. Lists are a fundamental data type that can be sorted, searched, and manipulated. Functions can accept and return lists as parameters or return values.
This document provides information about data structures in Python. It discusses lists, tuples, sets, and dictionaries. For lists and tuples, it covers defining, indexing, slicing, unpacking, methods, built-in functions, and list comprehensions. Lists can contain heterogeneous elements and support methods like append(), pop(), sort(), and reverse(). Tuples are similar to lists but are immutable ordered sequences. They also support indexing, slicing, and unpacking. This document serves as a guide to working with common Python data structures.
• List is a collection, which is ordered and changeable. Allows duplicate members.
• Tuple is a collection, which is ordered and unchangeable. Allows duplicate members.
• Set is a collection, which is unordered and unindexed. No duplicate members.
• Dictionary is a collection, which is unordered, changeable and indexed. No duplicate members.
The document provides information about various Python data structures concepts related to lists. It discusses list basics like creating, accessing and updating lists. It also covers list methods like append(), pop(), sort() etc. and how to pass, return and search lists in functions. Key topics include list operations, looping through lists, copying lists, multidimensional lists and comparing performance of lists and tuples.
This document discusses lists in Python. It begins by defining lists as collections of items indexed from 0 to n-1, where n is the number of items. It then covers creating and initializing lists, accessing list items using indexes and slicing, updating and manipulating lists, adding and deleting items from lists, basic list operations, and important list methods. It provides examples for each topic and ends with some example programs involving lists like finding the largest/mean value in a list and linear search.
The document discusses lists in Python. Some key points:
- A list is a mutable ordered sequence of elements of any data type. Lists can be created using square brackets or the list() constructor.
- List elements can be accessed using indexes and sliced. Methods like append(), insert(), pop() etc. are used to modify lists.
- Lists support operations like membership testing, repetition, concatenation etc. Functions like len(), max(), min() etc. operate on lists.
- Lists can be passed to and returned from functions. List comprehension provides a concise way to create lists.
- Searching and sorting algorithms like linear search, binary search, bubble sort, selection sort can be
This document discusses lists and tuples in Python. It explains that lists are mutable containers that can hold heterogeneous data types and grow or shrink in size dynamically. Tuples are immutable containers that can also hold heterogeneous data types but have a fixed size after creation. The document covers how to define, access, slice, loop through and perform common operations on elements in lists and tuples. It also discusses built-in functions like len(), max(), min() that can operate on lists and tuples.
The document discusses various concepts related to lists in Python including:
- What lists are and their main properties like being ordered, containing arbitrary objects that can be accessed by index, and being nestable and mutable.
- Common list methods like insert(), remove(), sort(), etc.
- How to define and assign lists, access list elements, and modify lists.
- List slicing and how it allows accessing a subset of list elements.
- Passing lists to functions and how lists are mutable.
- Algorithms for generating prime numbers and sorting lists like selection sort.
- Basic searching algorithms like linear search and binary search and how they work.
- The concept of list
The document discusses Python lists, tuples, and dictionaries. It provides examples of how to create, access, modify, and loop through each of these data types. Lists are ordered and changeable collections that allow duplicate elements. Tuples are ordered and unchangeable collections that allow duplicate elements. Dictionaries are unordered collections of key-value pairs that do not allow duplicate keys. The document demonstrates various methods and operations available for each data type, such as appending and removing elements from lists, accessing elements by index in lists and tuples, and adding or modifying elements in dictionaries.
The document discusses Python lists and their key features. It covers how lists are ordered sequences that can contain elements of different types. Lists are mutable and can be accessed using indexes. Common list operations include slicing, concatenation, repetition, sorting, and using various list methods like append(), extend(), index(), reverse() etc. Tuples are immutable sequences similar to lists. Dictionaries are another data type that store elements as key-value pairs. The document also briefly introduces regular expressions for text parsing and extraction.
Lists are mutable data structures that can contain elements of different data types. Some key list operations include:
1. Creating lists using square brackets and separating elements with commas. Nested lists are also possible.
2. Common list methods like append(), pop(), insert() allow adding, removing and modifying list elements.
3. Slicing lists using start and end indexes allows extracting sublist elements. The step parameter advances through elements.
4. Built-in functions like len(), index(), count() provide useful information about lists.
Textbook Solutions refer https://pythonxiisolutions.blogspot.com/
Practical's Solutions refer https://prippython12.blogspot.com/
Contiguous memory locations are occupied to store data in memory, this structure of storing data is Array.
Introduction to Lists
Elementary Data Representation Different data structures, Operations on Data structures.
Python supports several data types including numbers, strings, and lists. Numbers can be integer, float, or complex types. Strings are collections of characters that can be indexed, sliced, and manipulated using various string methods and operators. Lists are mutable sequences that can contain elements of different data types and support operations like indexing, slicing, sorting, and joining. Common list methods include append(), insert(), remove(), pop(), clear(), and sort(). Tuples are similar to lists but are immutable.
Python supports several numeric and non-numeric data types including integers, floats, complex numbers, strings, lists, and tuples. Numbers can be integers, floats, or complex, and support common operations. Strings are immutable sequences of characters that can be indexed, sliced, formatted, and concatenated. Lists are mutable sequences that can contain mixed data types, and support common operations like indexing, slicing, sorting, and joining. Tuples are similar to lists but are immutable.
Preprocessing - Data Integration Tuple DuplicationVidhyaB10
Data integration:
Combines data from multiple sources into a coherent store
Integration helps to reduce and avoid redundancies and inconsistencies
Schema integration: e.g., A.cust-id B.cust-#
Integrate metadata from different sources
Major Tasks in Data Preprocessing - Data cleaningVidhyaB10
Data Preprocessing: An Overview
Data Quality
Major Tasks in Data Preprocessing
Data Cleaning
Measures for data quality: A multidimensional view
Accuracy: correct or wrong, accurate or not
Completeness: not recorded, unavailable, …
Consistency: some modified but some not, dangling, …
Timeliness: timely update
Believability: how trustable the data are correct
Interpretability: how easily the data can be understood
Applications ,Issues & Technology in Data mining -VidhyaB10
Technology Used
Kind of Applications
Major Issues in Data Mining
Summary
Supervised learning - is defined as classification, learning comes from the labeled examples in the training data set.
Unsupervised learning is defined as clustering, the learning process is unsupervised since the input examples are not class labeled, clustering to discover classes within the data
Semi-supervised learning is a class of machine learning techniques that make use of both labeled and unlabeled examples when learning a model.
Active learning is a machine learning approach that lets users play an active role in the learning process. The goal is to optimize the model quality by actively acquiring knowledge from human users, given a constraint on how many examples they can be asked to label
Making informative visualizations is called as Plots, important task in data analysis
In exploratory analysis – identifying outliers, data transformations ,generating models visualization can be used.
Matplotlib is a desktop plotting package designed for creating publication-quality plots.
Project started by John Hunter to enable MATLAB like plotting interface in python.
Making informative visualizations is called as Plots, important task in data analysis
In exploratory analysis – identifying outliers, data transformations ,generating models visualization can be used.
Matplotlib is a desktop plotting package designed for creating publication-quality plots.
Project started by John Hunter to enable MATLAB like plotting interface in python.
Making informative visualizations is called as Plots, important task in data analysis
In exploratory analysis – identifying outliers, data transformations ,generating models visualization can be used.
Matplotlib is a desktop plotting package designed for creating publication-quality plots.
Project started by John Hunter to enable MATLAB like plotting interface in python.
Python_Functions_Modules_ User define Functions-VidhyaB10
a block of statements that can be used repeatedly in
a program
- will not execute immediately when a page loads
- will be executed by a call to the function
- takes one or more input in the form of parameter
does some processing using the input and returns a value.
Datamining - Introduction - Knowledge Discovery in DatabasesVidhyaB10
This PPT explains about data mining introduction with definition, need of data mining , KDD Steps, Diagram, Data needed, kinds of Pattern needed for data mining, data bases , The Explosive Growth of Data: from terabytes to petabytes
Data pour (TB,PB) into computer networks, the World Wide Web (WWW), and various data storage devices every day from business, society, science and engineering, medicine, and almost every other aspect of daily life.
The abundance of data, with the need for powerful data analysis tools, described as a data rich but information poor situation.
The fast-growing, tremendous amount of data, collected and stored in large and numerous data repositories , tools required
Therefore, large data repositories become “data tombs”—data archives that are seldom visited.
Developing expert system and knowledge-based technologies, rely on users or domain experts to manually input knowledge into knowledge bases. Unfortunately, the manual knowledge input procedure is prone to biases and errors and is extremely costly and time consuming. The abundance of data, with the need for powerful data analysis tools, described as a data rich but information poor situation.
The fast-growing, tremendous amount of data, collected and stored in large and numerous data repositories , tools required
Therefore, large data repositories become “data tombs”—data archives that are seldom visited.
Developing expert system and knowledge-based technologies, rely on users or domain experts to manually input knowledge into knowledge bases. Unfortunately, the manual knowledge input procedure is prone to biases and errors and is extremely costly and time consuming. The abundance of data, with the need for powerful data analysis tools, described as a data rich but information poor situation.
The fast-growing, tremendous amount of data, collected and stored in large and numerous data repositories , tools required
Therefore, large data repositories become “data tombs”—data archives that are seldom visited. Developing expert system and knowledge-based technologies, rely on users or domain experts to manually input knowledge into knowledge bases. Unfortunately, the manual knowledge input procedure is prone to biases and errors and is extremely costly and time consuming. Alternative names
Knowledge discovery (mining) in databases (KDD), knowledge extraction, data/pattern analysis, data archeology, data dredging, information harvesting, business intelligence, etc.
Is everything “data mining”?
Simple search and query processing
(Deductive) expert systems
Data mining (knowledge discovery from data)
Extraction of interesting (non-trivial, implicit, previously unknown and potentially useful) patterns or knowledge from huge amount of data
Truly interdisciplinary subject
The knowledge discovery process is shown in Figure as an iterative sequence of the following steps:
1. Data cleaning (to remove noise and inconsistent data)
2. Data integration (where multiple sources
INSTRUCTION PROCESSOR DESIGN Computer system architectureVidhyaB10
Instruction processor design, often referred to as INSTRUCTION SET ARCHITECTURE (ISA), is a crucial aspect of computer engineering.
It defines how a computer’s CPU is controlled by software, specifying the instructions the processor can execute, the data types it can handle, and the registers it uses.
Disk Scheduling in OS computer deals with multiple processes over a period of...VidhyaB10
A Process makes the I/O requests to the operating system to access the disk. Disk Scheduling Algorithm manages those requests and decides the order of the disk access given to the requests.
Unit 2 digital fundamentals boolean func.pptxVidhyaB10
Understand the basic operation of Boolean theorems.
• Explain the operation of different logic gates such as AND, OR, NOT, XOR, and
NAND gates.
• Show the truth table of different logic gates.
• Distinguish between the different types of integrated circuits (ICs).
• Apply Boolean theorems to simplify Boolean function.
• Draw logic circuit for Boolean function.
• Show the truth table of Boolean function.
Digital Fundamental - Binary Codes-Logic GatesVidhyaB10
Binary Codes,
This ppt gives a brief explanation about the digital and codes and logic gates that can be widely used. Weighted Codes, Binary codes, ASCII Codes, Parity Codes all can be used widely. A logic gate is an idealized model of computation or physical electronic device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output.
Logic gates are the basic building blocks of any digital system. It is an electronic circuit having one or more than one input and only one output.
The relationship between the input and the output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate etc.
, binary digits also be utilized to make such various innumerable combinations. These may be considered as Binary Codes.
Other than the commonly used 8421 code or BCD code, other Binary Codes like 2421 code, 5211 code, reflective code, sequential code, non-weighted code, excess-3 code and Gray code are also popular.
This document discusses file management in C programming. It defines a file as an object that stores data, information, settings or commands used with a computer program. There are two types of files - text files containing ASCII codes and binary files containing bytes. The main file operations are creating, opening, closing, reading and writing to files. To access files in a program, the FILE data type and pointer are used along with the fopen() function to open a file with a specified mode like read, write or append. Files must be closed using fclose() after operations are complete. The document provides details on file modes, defining and opening files.
This document provides an introduction to the Python programming language. It discusses that Python was created by Guido van Rossum in 1991 and is an interpreted, object-oriented, high-level programming language with features like code readability and the ability to express concepts in fewer lines of code. The document then covers Python's history, versions, features like being easy to learn and use, cross-platform compatibility, and its large standard library. It also discusses how to write and execute a first Python program, and covers numeric, string, and variable data types.
How to Manage & Create a New Department in Odoo 18 EmployeeCeline George
In Odoo 18's Employee module, organizing your workforce into departments enhances management and reporting efficiency. Departments are a crucial organizational unit within the Employee module.
How to Configure Vendor Management in Lunch App of Odoo 18Celine George
The Vendor management in the Lunch app of Odoo 18 is the central hub for managing all aspects of the restaurants or caterers that provide food for your employees.
This presentation was provided by Jennifer Gibson of Dryad, during the first session of our 2025 NISO training series "Secrets to Changing Behavior in Scholarly Communications." Session One was held June 5, 2025.
Unit- 4 Biostatistics & Research Methodology.pdfKRUTIKA CHANNE
Blocking and confounding (when a third variable, or confounder, influences both the exposure and the outcome) system for Two-level factorials (a type of experimental design where each factor (independent variable) is investigated at only two levels, typically denoted as "high" and "low" or "+1" and "-1")
Regression modeling (statistical model that estimates the relationship between one dependent variable and one or more independent variables using a line): Hypothesis testing in Simple and Multiple regression models
Introduction to Practical components of Industrial and Clinical Trials Problems: Statistical Analysis Using Excel, SPSS, MINITAB®️, DESIGN OF EXPERIMENTS, R - Online Statistical Software to Industrial and Clinical trial approach
How to Create an Event in Odoo 18 - Odoo 18 SlidesCeline George
Creating an event in Odoo 18 is a straightforward process that allows you to manage various aspects of your event efficiently.
Odoo 18 Events Module is a powerful tool for organizing and managing events of all sizes, from conferences and workshops to webinars and meetups.
Different pricelists for different shops in odoo Point of Sale in Odoo 17Celine George
Price lists are a useful tool for managing the costs of your goods and services. This can assist you in working with other businesses effectively and maximizing your revenues. Additionally, you can provide your customers discounts by using price lists.
Pests of Rice: Damage, Identification, Life history, and Management.pptxArshad Shaikh
Rice pests can significantly impact crop yield and quality. Major pests include the brown plant hopper (Nilaparvata lugens), which transmits viruses like rice ragged stunt and grassy stunt; the yellow stem borer (Scirpophaga incertulas), whose larvae bore into stems causing deadhearts and whiteheads; and leaf folders (Cnaphalocrocis medinalis), which feed on leaves reducing photosynthetic area. Other pests include rice weevils (Sitophilus oryzae) and gall midges (Orseolia oryzae). Effective management strategies are crucial to minimize losses.
Rose Cultivation Practices by Kushal Lamichhane.pdfkushallamichhame
This includes the overall cultivation practices of Rose prepared by:
Kushal Lamichhane (AKL)
Instructor
Shree Gandhi Adarsha Secondary School
Kageshowri Manohara-09, Kathmandu, Nepal
This presentation has been made keeping in mind the students of undergraduate and postgraduate level. To keep the facts in a natural form and to display the material in more detail, the help of various books, websites and online medium has been taken. Whatever medium the material or facts have been taken from, an attempt has been made by the presenter to give their reference at the end.
In the seventh century, the rule of Sindh state was in the hands of Rai dynasty. We know the names of five kings of this dynasty- Rai Divji, Rai Singhras, Rai Sahasi, Rai Sihras II and Rai Sahasi II. During the time of Rai Sihras II, Nimruz of Persia attacked Sindh and killed him. After the return of the Persians, Rai Sahasi II became the king. After killing him, one of his Brahmin ministers named Chach took over the throne. He married the widow of Rai Sahasi and became the ruler of entire Sindh by suppressing the rebellions of the governors.
HOW YOU DOIN'?
Cool, cool, cool...
Because that's what she said after THE QUIZ CLUB OF PSGCAS' TV SHOW quiz.
Grab your popcorn and be seated.
QM: THARUN S A
BCom Accounting and Finance (2023-26)
THE QUIZ CLUB OF PSGCAS.
How to Create a Rainbow Man Effect in Odoo 18Celine George
In Odoo 18, the Rainbow Man animation adds a playful and motivating touch to task completion. This cheerful effect appears after specific user actions, like marking a CRM opportunity as won. It’s designed to enhance user experience by making routine tasks more engaging.
Python _dataStructures_ List, Tuples, its functions
1. Python Programming – Unit 3
Part – 2
Datastructures
1
https://www.slideshare.net/slideshow/python_funct
ions_modules_-user-define-functions/275958501
Dr.VIDHYA B
ASSISTANT PROFESSOR & HEAD
Department of Computer Technology
Sri Ramakrishna College of Arts and Science
Coimbatore - 641 006
Tamil Nadu, India
3. Python Data Structures
- Is a group of data elements that are put together
under one name
- Defines a particular way of storing and organizing
data in a computer so that it can be used efficiently
4. 1. LIST
- It is a sequence in which elements are written as a
list of comma separated values.
- Elements can be of different data types
- It takes the form
list_variable = [val1, val2, val3,…,valn]
6. Accessing Values in List
- Similar to strings, lists can also be sliced and
concatenated
- square brackets are used to slice along with the
index/indices to get values stored at that index.
-For example:
seq = list[start:stop:step]
seq = list[::2] #get every other element, starting with index 0
seq = list[1::2] #get every other element, starting with index 1
7. Accessing Values in List (Example)
l1 = [1,2,3,4,5,6,7,8,9,10]
print(“List is:”, l1)
print(“First element is:”, l1[0])
print(“Index 2 – 5th
element:”, l1[2:5])
print(“From 0th
index, skip one element:”, l1[ : : 2])
print(“From 1st
index, skip two elements:”, l1[1::3])
Output:
List is: [1,2,3,4,5,6,7,8,9,10]
First element is: 1
Index 2 – 5th
element: [3,4,5]
From 0th
index, skip one element: [1,3,5,7,9]
From 1st
index, skip two elements: [2,5,8]
8. Updating Values in List
- A list can be updated by giving the slice on the left-hand
side of the assignment operator
- New values can be appended in the list with the method
append( ). The input to this method will be appended at
the end of the list
- Existing values can be removed by using the del statement.
Value at the specified index will be deleted.
9. Updating Values in List (Example)
l1 = [1,2,3,4,5,6,7,8,9,10]
print(“List is:”, l1)
l1[5] = 100
print(“After update:”, l1)
l1.append(200)
print(“After append”, l1)
del l1[3]
print(“After delete:”, l1)
del l1[2:4]
print(“After delete:”, l1)
del l1[:]
print(“After delete:”, l1)
Output:
List is: [1,2,3,4,5,6,7,8,9,10]
After update: [1,2,3,4,5,100,7,8,9,10]
After append: [1,2,3,4,5,100,7,8,9,10, 200]
After delete: [1,2,3,5,100,7,8,9,10, 200]
After delete: [1,2,100,7,8,9,10, 200]
After delete: [ ]
10. Slice Operation on List
#insert a list in another list using slice operation
li=[1,9,11,13,15]
print(“Original List:”, li)
li[2]=[3,5,7]
print(“After inserting another list, the updated list is:”, li)
Output:
Original List: [1,9,11,13,15]
After inserting another list, the updated list is: [1,9,[3,5,7],13,15]
11. Nested List
-List within another list
Example:
l1 = [1, ‘a’, “abc”, [2,3,4,5], 8.9]
i = 0
while i<(len[l1]):
print(“l1[“ , i , “] =“, l[i])
i+ = 1
Output:
l1[0] = 1
l1[1] = a
l1[2] = abc
l1[3] = [2,3,4,5]
l1[4] = 8.9
12. Cloning List
Example:
def Cloning(li1):
li_copy = li1[:]
return li_copy
li1 = [4, 8, 2, 10, 15, 18]
li2 = Cloning(li1)
print("Original List:", li1)
print("After Cloning:", li2)
Output:
Original List: [4,8,2,10,15,18]
After Cloning : [4,8,2,10,15,18]
Cloning
If there is a need
to modify a list
and also to keep a
copy of the
original list, then
a separate copy
of the list must be
created
13. Basic List Operations
1 2
Operation len Concatenation
Description Returns length of the list Joins two list
Example len([1,2,3,4,5,6,7,8,9,10]) [1,2,3,4,5] + [6,7,8,9,10]
Output 10 [1,2,3,4,5,6,7,8,9,10]
3 4
Operation Repetition in
Description Repeats elements in the list Checks if the values is present
in the list
Example “Hello”, “World” *2 ‘a’ in [‘a’, ‘e’, ‘i’, ‘o’, ‘u’]
Output [‘Hello’, ‘World’, ‘Hello’,
‘World’]
True
14. Basic List Operations (Continued…)
5 6
Operation not in max
Description Checks if the value is not available
in the list
Returns maximum value in the
list
Example 3 not in [0,2,4,6,8] n=[2,3,4]
print(max(n))
Output True 4
7 8
Operation min sum
Description Returns minimum value in the list Adds the values in the list that
has number
Example n=[2,3,4]
print(min(n))
n=[2,3,4]
print(“Sum:”, sum(n))
Output 2 9
15. Basic List Operations (Continued…)
9 10
Operation all any
Description Returns true if all elements of the
list are true (or if the list is
empty)
Returns true if any elements of
the list are true . If empty False
Example n=[0,1,2,3]
print(all(n))
n=[0,1,2,3]
print(any(n))
Output False True
11 12
Operation list sorted
Description Converts an iterable (tuple,
string, set, dictionary) to a list
Returns a new sorted list. The
original list is not sorted
Example list1=list(“HELLO”)
print(list1)
list1=[1,5,3,2]
list2 = sorted(list1)
print(list2)
Output [‘H’, ‘E’, ‘L’, ‘L’, ‘O’] [1,2,3,5]
16. Basic List Operations (Continued…)
Few more examples on Indexing, Slicing and other
operations
list_a =[“Hello”, “World”, “Good”, “Morning”]
print(list_a[2]) #index starts at 0
print(list_a[-3]) #3rd
element from the end
print(list_a[1:]) # Prints all elements starting from index 1
Output:
Good
World
[ “World”, “Good”, “Morning”]
17. List Methods
1 2
Operation append( ) count()
Description Appends an element to the list Counts the number of times an
element appears in the list
Example n=[6,3,7,0,1,2,4,9]
append(10)
print(n)
n=[6,3,7,0,1,2,4,9]
print(n.count(4))
Output [6,3,7,0,1,2,4,9,10] 1
3 4
Operation index() insert( )
Description Returns the lowest index of obj in
the list
Inserts obj at the specified index
in the list
Example n = [6,3,7,0,1,2,4,9]
print(n.index(7))
n = [6,3,7,0,1,2,4,9]
n.insert(3,100)
print(n)
Output 2 n = [6,3,7,100,1,2,4,9]
18. List Methods (Continued…)
5 6
Operation pop( ) remove( )
Description Removes the element in the specified
index. If no index is specified, last
element will be removed
Removes the specified element
from the list.
Example n = [6,3,7,0,1,2,4,9]
print(n.pop( ))
print(n)
n = [6,3,7,0,1,2,4,9]
print(n.remove(0))
print(n)
Output 9 [6,3,7,0,1,2,4] [6,3,7,1,2,4,9]
7 8
Operation reverse( ) sort( )
Description Reverses the elements in the list Sorts the elements in the list
Example n = [6,3,7,0,1,2,4,9]
n.reverse( )
print(n)
n = [6,3,7,0,1,2,4,9]
n.sort( )
print(n)
Output [9,4,2,1,0,7,3,6,] [0, 1, 2, 3, 4, 6, 7, 9]
19. List Methods (Continued…)
9 Insert()
Remove()
Sort()
The above methods only
modify the list and do not
return any value
Operation extend
Description Adds the element in a list to the end
of the another list
Example n1 = [1,2,3,4,5]
n2 = [6,7,8,9,10]
n1.extend(n2)
print(n1)
Output [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
20. February 23, 2025 20
Using Lists as Stacks
- Stack is a DS which stores
its elements in an ordered
manner.
- Eg: Pile of Plates
- Stack is a linear DS uses the
same principle (ie) elements
are added and removed only
from one end.
- Hence Stack follows LIFO
(Last in First Out)
21. February 23, 2025 21
Using Lists as Stacks
- Stacks in computer science is used in function
calls.
23. February 23, 2025 23
Using Lists as Stacks
- Stack supports 3 operations:
PUSH: Adds an element at the end of the stack.
POP: Removes the element from the stack.
PEEP: Returns the value of the last element from the
stack(without deleting it).
In python list methods are used to perform the above
operation
- PUSH- append () method
- POP- pop() method
- PEEP- slicing operation is used
25. February 23, 2025 25
Using Lists as Queues
- Queue is a DS which stores its elements in an ordered manner.
- Eg:
*People moving in escalator
*People waiting for bus
*Luggage kept at conveyor belt.
*Cars lined at toll bridge.
Stack is a linear DS uses the same principle (ie) elements are
added at one end and removed from other end.
- Hence Queue follows FIFO (First in First Out)
27. February 23, 2025 27
List Comprehensions
Python supports computed lists called List Comprehensions
Syntax:
List= [expression for variable in sequence]
- Beneficial to make new list where each element is
obtained by applying some operations to each
member of another sequence or iterable.
- Also used to create a subsequence of those
elements that satisfy certain conditions.
An iterable is an object that can be used repeatedly
in a subsequent loop statements. Eg: For loop
29. February 23, 2025 29
Looping in Lists
Python’s for and
in construct useful
when working
with lists, easy to
access each
element in a list.
30. February 23, 2025 30
Looping in Lists
Multiple ways to
access a List:
Iterator Function:
Loop over the
elements when
used with next()
method.
Uses built-in
iter()function
32. February 23, 2025 32
What is Functional Programming ?
Functional Programming
decomposes a problem into set of
functions
Map( ), filter( ), reduce( )
33. February 23, 2025 33
Filter Function
- Filter function constructs a list from those
elements of the list for which a function returns
True.
- filter(function, sequence)
- If sequence is a string, Unicode or a tuple, then the
result will be of same type otherwise it is always a
list.
34. February 23, 2025 34
Filter Function (Example)
def check(x):
if (x % 2 == 0 or x % 4 = =0):
return 1
events = list(filter(check, range(2, 22)))
print(events)
Output:
[ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
Explanation:
The filter function returns True or False. Functions that returns a
Boolean value called as Predicates. Only those values divisible
by 2 or 4 is included in newly created list.
35. February 23, 2025 35
Map Function
- Map() function applies a particular function to
every element of a list. Its syntax is same as the
filter function.
- map(function, sequence)
- After applying the specified function on the
sequence the map() function returns the modified
list.
- It calls function(item)for each item in a sequence
a returns a list of return values.
36. February 23, 2025 36
Map Function (Example)
Explanation: Map() calls add_2() which adds 2 to every
element in the list
37. February 23, 2025 37
Map Function (Example)
def add(x,y):
return x+y
List1 = [1,2,3,4,5]
List2 = [6,7,8,9,10]
List3 = list(map(add, list1, list2))
Print(“sum of” , list1, “ and”, list2, “ =“, list3)
Output:
sum of [1,2,3,4,5] and [6,7,8,9,10] = [7,9,11,13,15]
Explanation:
Here more than one sequence is passed in map().
- Function must have as many as arguments as there are sequences.
- Each argument is called with corresponding item from each
sequence
38. February 23, 2025 38
Reduce Function
- Reduce() function returns a single value
generated by calling the function.
- reduce(function, sequence)