The document discusses for loops in Python. It explains that for loops are used to iterate over sequences like lists, tuples, and strings. There are two types of for loops: 1) Getting each element of the sequence, and 2) Using the range() function to generate a sequence of numbers to use as indexes. The document provides examples of iterating over lists and strings using for loops, and using break and continue statements to control loop behavior. It also explains how to use the range() function to generate a sequence of numbers for iteration.
In this PPT you will learn how to use looping in python.
For more presentation in any subject please contact us on
raginijain0208@gmail.com.
You get a new presentation every Sunday at 10 AM.
Learn more about Python by clicking on given below link
Python Introduction- https://www.slideshare.net/RaginiJain21/final-presentation-on-python
Basic concept of Python -https://www.slideshare.net/RaginiJain21/python-second-ppt
Python Datatypes - https://www.slideshare.net/RaginiJain21/data-types-in-python-248466302
Python Library & Module - https://www.slideshare.net/RaginiJain21/python-libraries-and-modules
Basic Python Programs- https://www.slideshare.net/RaginiJain21/basic-python-programs
Python Media Libarary - https://www.slideshare.net/RaginiJain21/python-media-library
Python If Else | If Else Statement In Python | EdurekaEdureka!
YouTube Link: https://youtu.be/nMEFZ6TvkDA
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'If Else In Python' will help you understand how you can use a conditional if and else statements in python for decision making with concepts like shorthand if and else, nested if-else, etc. Following are the topics discussed:
What Are Python Conditions?
What Is If And If Else In Python?
Syntax For If Else In Python
Shorthand If Else
Use Case - Nested If Else
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
In this PPT you will learn how to use looping in python.
For more presentation in any subject please contact us on
raginijain0208@gmail.com.
You get a new presentation every Sunday at 10 AM.
Learn more about Python by clicking on given below link
Python Introduction- https://www.slideshare.net/RaginiJain21/final-presentation-on-python
Basic concept of Python -https://www.slideshare.net/RaginiJain21/python-second-ppt
Python Datatypes - https://www.slideshare.net/RaginiJain21/data-types-in-python-248466302
Python Library & Module - https://www.slideshare.net/RaginiJain21/python-libraries-and-modules
Basic Python Programs- https://www.slideshare.net/RaginiJain21/basic-python-programs
Python Media Libarary - https://www.slideshare.net/RaginiJain21/python-media-library
Python If Else | If Else Statement In Python | EdurekaEdureka!
YouTube Link: https://youtu.be/nMEFZ6TvkDA
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'If Else In Python' will help you understand how you can use a conditional if and else statements in python for decision making with concepts like shorthand if and else, nested if-else, etc. Following are the topics discussed:
What Are Python Conditions?
What Is If And If Else In Python?
Syntax For If Else In Python
Shorthand If Else
Use Case - Nested If Else
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
2D array in C++ language ,define the concept of c++ Two-Dimensional array .with example .and also Accessing Array Components concept.and Processing Two-Dimensional Arrays.
statement in python conditional statement.For more presentation please contact us on raginijain0208@gmail.com.
You get new presentation every Sunday at 10 AM.
Learn more about Python by click on this given below link
Python Introduction- https://www.slideshare.net/RaginiJain21/final-presentation-on-python
Basic concept of Python -https://www.slideshare.net/RaginiJain21/python-second-ppt
Python Datatypes - https://www.slideshare.net/RaginiJain21/data-types-in-python-248466302
Python Library & Module - https://www.slideshare.net/RaginiJain21/python-libraries-and-modules
Basic Python Programs- https://www.slideshare.net/RaginiJain21/basic-python-programs
Python Media Libarary - https://www.slideshare.net/RaginiJain21/python-media-library
This is presentation, that covers all the important topics related to strings in python. It covers storing, slicing, format, concatenation, modification, escape characters and string methods.
The file attatched also includes examples related to the slides shown.
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAMaulik Borsaniya
Introduction to Python:
The basic elements of Python, Objects, expressions and numerical Types, Variables and assignments, IDLE, Branching programs, Strings and Input, Iteration
Structured Types, Mutability and Higher-order Functions:
Tuples, Lists and Mutability, Functions as Objects, Strings, Tuples and Lists, Dictionaries
YouTube Link: https://youtu.be/mHezNgNBnuA
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Date and Time in Python' will train you to use the datetime and time modules to fetch, set and modify date and time in python.
Below are the topics covered in this PPT:
The time module
Built-in functions
Examples
The datetime module
Built-in functions
Examples
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxpriestmanmable
ISTA 130: Lab 2
1 Turtle Review
Here are all of the turtle functions we have utilized so far in this course:
turtle.forward(distance) – Moves the turtle forward in the direction it is currently facing the distance
entered
turtle.backward(distance) – Same as forward but it moves in the opposite direction the turtle is facing
turtle.right(degrees) – Roates the turtle to the right by the degrees enteres
turtle.left(degrees) – Same as right, but it rotates the turtle to the left
turtle.pensize(size) – Adjusts the size of the line left by the turtle to whatever value is entered for size
turtle.home() – Moves the turtle to the default location and faces it to the right
turtle.clear() – Clears all the lines that were left by the turtle in the window.
turtle.penup() – Causes the turtle to stop leaving lines (until pen is placed back down)
turtle.pendown() – Places the pen back down to the turtle can continue leaving lines when forward and
backward are called.
turtle.pencolor(color string) – Changes the color of the lines left by the turtle to whatever color string
entered (so long as Python recognizes it).
turtle.bgcolor(color string) – Changes the background color for the window that the turtle draws in.
turtle.speed(new speed) – Changes the speed at which the turtle moves to whatever newSpeed is.
turtle.clearscreen() – Deletes all drawings and turtles from the screen, leaving it in its initial state
Note that abbreviations also exist for many of these functions; for example:
� turtle.fd(distance)
� turtle.rt(degrees)
� turtle.pu()
1
2 Functions and Parameters
Here is the square function we looked at yesterday:
def square(side_length):
’’’
Draws a square given a numerical side_length
’’’
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
return
square(50) # This would give side_length the value of 50
square(100) # This would give side_length the value of 100
print side_length # This will give an error because side_length
# only exists inside the function!
Try it out:
(1 pt.) Create a new file called lab02.py. In this file, create a simple function called rhombus. It
will take one parameter, side length. Using this parameter, have your function create a rhombus
using turtle graphics. Call your rhombus function in the script. What happens if you provide no
arguments to the function? Two or three arguments?
Then, modify your rhombus function so it takes another argument for the angle inside the
rhombus.
3 Data types
Python recognizes many different types of values when working with data. These can be numbers,
strings of characters, or even user defined objects. For the time being, however, were only going to
focus on three of the data types:
integer – These are whole numbers, both positive and negative. Examples are 5000, 0, and -25
float – These are numbers that are followed by a decimal poi ...
2D array in C++ language ,define the concept of c++ Two-Dimensional array .with example .and also Accessing Array Components concept.and Processing Two-Dimensional Arrays.
statement in python conditional statement.For more presentation please contact us on raginijain0208@gmail.com.
You get new presentation every Sunday at 10 AM.
Learn more about Python by click on this given below link
Python Introduction- https://www.slideshare.net/RaginiJain21/final-presentation-on-python
Basic concept of Python -https://www.slideshare.net/RaginiJain21/python-second-ppt
Python Datatypes - https://www.slideshare.net/RaginiJain21/data-types-in-python-248466302
Python Library & Module - https://www.slideshare.net/RaginiJain21/python-libraries-and-modules
Basic Python Programs- https://www.slideshare.net/RaginiJain21/basic-python-programs
Python Media Libarary - https://www.slideshare.net/RaginiJain21/python-media-library
This is presentation, that covers all the important topics related to strings in python. It covers storing, slicing, format, concatenation, modification, escape characters and string methods.
The file attatched also includes examples related to the slides shown.
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAMaulik Borsaniya
Introduction to Python:
The basic elements of Python, Objects, expressions and numerical Types, Variables and assignments, IDLE, Branching programs, Strings and Input, Iteration
Structured Types, Mutability and Higher-order Functions:
Tuples, Lists and Mutability, Functions as Objects, Strings, Tuples and Lists, Dictionaries
YouTube Link: https://youtu.be/mHezNgNBnuA
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Date and Time in Python' will train you to use the datetime and time modules to fetch, set and modify date and time in python.
Below are the topics covered in this PPT:
The time module
Built-in functions
Examples
The datetime module
Built-in functions
Examples
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxpriestmanmable
ISTA 130: Lab 2
1 Turtle Review
Here are all of the turtle functions we have utilized so far in this course:
turtle.forward(distance) – Moves the turtle forward in the direction it is currently facing the distance
entered
turtle.backward(distance) – Same as forward but it moves in the opposite direction the turtle is facing
turtle.right(degrees) – Roates the turtle to the right by the degrees enteres
turtle.left(degrees) – Same as right, but it rotates the turtle to the left
turtle.pensize(size) – Adjusts the size of the line left by the turtle to whatever value is entered for size
turtle.home() – Moves the turtle to the default location and faces it to the right
turtle.clear() – Clears all the lines that were left by the turtle in the window.
turtle.penup() – Causes the turtle to stop leaving lines (until pen is placed back down)
turtle.pendown() – Places the pen back down to the turtle can continue leaving lines when forward and
backward are called.
turtle.pencolor(color string) – Changes the color of the lines left by the turtle to whatever color string
entered (so long as Python recognizes it).
turtle.bgcolor(color string) – Changes the background color for the window that the turtle draws in.
turtle.speed(new speed) – Changes the speed at which the turtle moves to whatever newSpeed is.
turtle.clearscreen() – Deletes all drawings and turtles from the screen, leaving it in its initial state
Note that abbreviations also exist for many of these functions; for example:
� turtle.fd(distance)
� turtle.rt(degrees)
� turtle.pu()
1
2 Functions and Parameters
Here is the square function we looked at yesterday:
def square(side_length):
’’’
Draws a square given a numerical side_length
’’’
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
turtle.forward(side_length)
turtle.right(90)
return
square(50) # This would give side_length the value of 50
square(100) # This would give side_length the value of 100
print side_length # This will give an error because side_length
# only exists inside the function!
Try it out:
(1 pt.) Create a new file called lab02.py. In this file, create a simple function called rhombus. It
will take one parameter, side length. Using this parameter, have your function create a rhombus
using turtle graphics. Call your rhombus function in the script. What happens if you provide no
arguments to the function? Two or three arguments?
Then, modify your rhombus function so it takes another argument for the angle inside the
rhombus.
3 Data types
Python recognizes many different types of values when working with data. These can be numbers,
strings of characters, or even user defined objects. For the time being, however, were only going to
focus on three of the data types:
integer – These are whole numbers, both positive and negative. Examples are 5000, 0, and -25
float – These are numbers that are followed by a decimal poi ...
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docxfaithxdunce63732
CS 360 LAB 3: STRINGS, FUNCTIONS, AND METHODS
Objective: The purpose of this lab is to get you comfortable with using the Python functions and modules.
Note: Python has a lot of modules that come with the language, which collectively are called the Python Standard Library. The Python documentation contains the specifications for all the functions in the library. You can get to it from the link on the course website, or by going here:
http://docs.python.org/library/
1) Strings
Strings have many handy methods, whose specifications can be found at the following URL:
http://docs.python.org/2/library/stdtypes.html#string-methods
Strings are a built-in type, so although there is a module named string, you do not need it for basic string operations.
To reference substrings (or even individual characters) we can use the bracket notation shown in class. Remember Python counts characters starting from zero|for example, s[1] is the second character in s.
One of the things to remember about strings is that they are immutable. Methods or sequence operations return new strings; they never modify the original string object.
Evaluating string Expressions. Before starting with the table below, enter the following assignment statement into the Python shell:
s = "Hello World!"
Once you have done that, you will use the string stored in s to _ll out the table below.
Expression Expected
Expected Value
Calculated value
Reason for calculated value
s[2]
s[15]
s[1:5]
s[:5]
s[5:]
"e" in s
"x" in s
s.index("e")
s.index("x")
s.index("l", 5)
where to start looking)
s.find("e")
s.find("x")
s.islower()
s[1:5].islower()
Prepared By: Kajal Nusratullah Page 1
Programming Languages CS 360
Lab Tutorial # 1 Week no 1 and 2
Visit the following link and Install Python 3.
www.python.org
Beginning with python
Type the following text to the right of the Python prompt and press the Enter key:
>>> print ("Hello, Python!")
Assigning Values to Variables:
Python variables do not have to be explicitly declared to reserve memory space. The declaration happens
automatically when you assign a value to a variable. The equal sign (=) is used to assign values to variables.
The operand to the left of the = operator is the name of the variable and the operand to the right of the = operator is
the value stored in the variable. For example:
counter = 100 # An integer assignment
miles = 1000.0 # A floating point
name = "John" # A string
print counter
print miles
print name
Here, 100, 1000.0 and "John" are the values assigned to counter, miles and name variables, respectively. While
running this program, this will produce the following result:
100
1000.0
John
Write down a program in C and Java that will
declare the same variables, assign the same
values and discuss th.
Python is a general-purpose, and multi-paradigm dynamic object oriented programming language. Python is a simple, portable, open source, and powerful programming language.
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docxjane3dyson92312
Assg 05: Quicksort
COSC 2336 Data Structures
Objectives
• Practice writing functions
• Practice writing recursive functions.
• Learn about Analysis of algorithms and O(n log n) sorts
Description
In this assignment we will be implementing one of the most popular sorting
algorithms used in libraries (like the C++ STL library, and the UNIX qsort
function) to provide basic sorting abilities, the Quicksort algorithm. I would
recommend that you at least read section 7.5 from our supplemental Shaffer
textbook on Quicksort, if not sections 7.1-7.5 talking about three well known
O(n log n) sorting algorithms, and the 3 O(n2) algorithms we discussed last
week.
Quicksort, when properly implemented, is very attractive because it pro-
vides a way to do a fast sort completely in-place (without having to allocate
additional memory to do the sort, beyond a single value needed when swap-
ping two values in the list being sorted). In the worst case, Quicksort is
actually O(n2), no better than bubble sort. But this worse case only occurs
when every pivot selected is the wort possible, and does not divide the list
at all. This is very unlikely to happen, unless you know how the pivot is
selected, and specifically design the input list to always choose the worst
possible pivot. On average the cost of Quicksort is O(n log n), and it is
usually very likely that average case performance will result when lists to be
sorted are relatively random.
The most direct implementation of Quicksort is as a recursive algorithm.
Quicksort is an example of a divide and conquer approach to solving the
problem of sorting the list. We are given a list of items, A and indexes left
1
and right that indicate a sub-portion of the list to be sorted. left and right
indicate the actual indexes, so if the list is a regular C array of integers, and
the array is of size 10
int left;
int right;
const inst SIZE = 10;
int A[size];
Then to sort the whole list we set left = 0 and right = 9 to initially
call the Quicksort function:
left = 0;
right = size-1;
quicksort(A, left, right);
Conceptually the steps of the Quicksort algorithm are as follows:
1. if list size is 0 or 1 (left <= right) return (lists of this size are sorted
by definition).
2. Choose a pivot value and swap the pivot value to the end of the list
swap(pivotIndex, right)
3. Partition the list. Partitioning means all values less than the pivot
value should end up on the left of the list, and all values greater will
be on the right. The first index k where a value >= to the pivot value
is at indicates the new left and right side sub-lists.
4. Swap the pivot value to its correct position k swap(k, right)
5. Recursively call Quicksort on the new left and right sub-lists
• quicksort(A, left, k-1)
• quicksort(A, k+1, right)
Most of the real work happens in the function/code to partition the list.
The partitioning of the list, for Quicksort to be an in-place sort, must work
by swapping values in-place in the list o.
Assg 05 QuicksortCOSC 2336 Data StructuresObjectives.docxfestockton
Assg 05: Quicksort
COSC 2336 Data Structures
Objectives
• Practice writing functions
• Practice writing recursive functions.
• Learn about Analysis of algorithms and O(n log n) sorts
Description
In this assignment we will be implementing one of the most popular sorting
algorithms used in libraries (like the C++ STL library, and the UNIX qsort
function) to provide basic sorting abilities, the Quicksort algorithm. I would
recommend that you at least read section 7.5 from our supplemental Shaffer
textbook on Quicksort, if not sections 7.1-7.5 talking about three well known
O(n log n) sorting algorithms, and the 3 O(n2) algorithms we discussed last
week.
Quicksort, when properly implemented, is very attractive because it pro-
vides a way to do a fast sort completely in-place (without having to allocate
additional memory to do the sort, beyond a single value needed when swap-
ping two values in the list being sorted). In the worst case, Quicksort is
actually O(n2), no better than bubble sort. But this worse case only occurs
when every pivot selected is the wort possible, and does not divide the list
at all. This is very unlikely to happen, unless you know how the pivot is
selected, and specifically design the input list to always choose the worst
possible pivot. On average the cost of Quicksort is O(n log n), and it is
usually very likely that average case performance will result when lists to be
sorted are relatively random.
The most direct implementation of Quicksort is as a recursive algorithm.
Quicksort is an example of a divide and conquer approach to solving the
problem of sorting the list. We are given a list of items, A and indexes left
1
and right that indicate a sub-portion of the list to be sorted. left and right
indicate the actual indexes, so if the list is a regular C array of integers, and
the array is of size 10
int left;
int right;
const inst SIZE = 10;
int A[size];
Then to sort the whole list we set left = 0 and right = 9 to initially
call the Quicksort function:
left = 0;
right = size-1;
quicksort(A, left, right);
Conceptually the steps of the Quicksort algorithm are as follows:
1. if list size is 0 or 1 (left <= right) return (lists of this size are sorted
by definition).
2. Choose a pivot value and swap the pivot value to the end of the list
swap(pivotIndex, right)
3. Partition the list. Partitioning means all values less than the pivot
value should end up on the left of the list, and all values greater will
be on the right. The first index k where a value >= to the pivot value
is at indicates the new left and right side sub-lists.
4. Swap the pivot value to its correct position k swap(k, right)
5. Recursively call Quicksort on the new left and right sub-lists
• quicksort(A, left, k-1)
• quicksort(A, k+1, right)
Most of the real work happens in the function/code to partition the list.
The partitioning of the list, for Quicksort to be an in-place sort, must work
by swapping values in-place in the list o ...
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
2. Quick revision
What is a list?
Difference between list and a variable
Can list store data of multiple types?
What is used to iterate over a list?
How to calculate length of list?
Are strings stored as lists in python?
3. What is for loop???
The for loop in Python is used to iterate over
a sequence (list, tuple, string) or other
iterable objects.
Iterating over a sequence is called traversal.
4. 2 types of writing for loops
1.Getting each element of the sequence
2.Range (): By generating range of numbers and
use these numbers as indexes to access
sequences.
14. The range() function
We can generate a sequence of numbers using
range() function. range(10) will generate
numbers from 0 to 9 (10 numbers).
We can also define the start, stop and step size
as range(start,stop,step size). step size defaults
to 1 if not provided.
To force this function to output all the items, we
can use the function list().