0% found this document useful (0 votes)
14 views40 pages

Learn Python 3 1st Edition Ankit Mahato Download

The document provides links to download various Python-related ebooks, including 'Learn Python 3' by Ankit Mahato. It also lists additional resources for learning Python and other programming topics. The content includes an introduction to programming languages, Python fundamentals, and various programming concepts.

Uploaded by

hineshmanie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views40 pages

Learn Python 3 1st Edition Ankit Mahato Download

The document provides links to download various Python-related ebooks, including 'Learn Python 3' by Ankit Mahato. It also lists additional resources for learning Python and other programming topics. The content includes an introduction to programming languages, Python fundamentals, and various programming concepts.

Uploaded by

hineshmanie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Learn Python 3 1st Edition Ankit Mahato pdf

download

https://ebookmeta.com/product/learn-python-3-1st-edition-ankit-
mahato/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Hands-on Matplotlib: Learn Plotting and Visualizations


with Python 3 Ashwin Pajankar

https://ebookmeta.com/product/hands-on-matplotlib-learn-plotting-
and-visualizations-with-python-3-ashwin-pajankar/

Python Workbook Learn Python in one day and Learn It


Well 2nd Edition Jamie Chan

https://ebookmeta.com/product/python-workbook-learn-python-in-
one-day-and-learn-it-well-2nd-edition-jamie-chan/

Learn Raspberry Pi Programming with Python 1st Edition


Wolfram Donat

https://ebookmeta.com/product/learn-raspberry-pi-programming-
with-python-1st-edition-wolfram-donat/

Studying Complex Interactions and Outcomes Through


Qualitative Comparative Analysis: A Practical Guide to
Comparative Case Studies and Ethnographic Data Analysis
Markus Kröger
https://ebookmeta.com/product/studying-complex-interactions-and-
outcomes-through-qualitative-comparative-analysis-a-practical-
guide-to-comparative-case-studies-and-ethnographic-data-analysis-
SOCRATICALLY A FESTSCHRIFT IN HONOR OF CLAUDIO DE
ALMEIDA Eduardo Alves J R Fett Kátia M Etcheverry Org

https://ebookmeta.com/product/socratically-a-festschrift-in-
honor-of-claudio-de-almeida-eduardo-alves-j-r-fett-katia-m-
etcheverry-org/

Losing one s head in the ancient Near East


interpretation and meaning of decapitation First Issued
In Paperback. Edition Rita Dolce

https://ebookmeta.com/product/losing-one-s-head-in-the-ancient-
near-east-interpretation-and-meaning-of-decapitation-first-
issued-in-paperback-edition-rita-dolce/

Perplexing Plots Popular Storytelling and the Poetics


of Murder 1st Edition David Bordwell

https://ebookmeta.com/product/perplexing-plots-popular-
storytelling-and-the-poetics-of-murder-1st-edition-david-
bordwell/

Formalising Natural Languages with NooJ 2013 Selected


papers from the NooJ 2013 International Conference 1st
Edition Svetla Koeva

https://ebookmeta.com/product/formalising-natural-languages-with-
nooj-2013-selected-papers-from-the-nooj-2013-international-
conference-1st-edition-svetla-koeva/

Digital Media Foundations An Introduction for Artists


and Designers 1st Edition Richard Lewis

https://ebookmeta.com/product/digital-media-foundations-an-
introduction-for-artists-and-designers-1st-edition-richard-lewis/
Art and Culture Patterns of the Past Partitioning
Shapes Lisa A. Willman

https://ebookmeta.com/product/art-and-culture-patterns-of-the-
past-partitioning-shapes-lisa-a-willman/
Contents

Introduction 1
Introduction to Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction to Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Advantages of Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Installing Python in Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Installing Python in macOS (Apple) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Execution Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Interactive Mode of Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Script Mode of Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Python Fundamentals 11
Tokens: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Tokens: Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Tokens: Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Tokens: Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Tokens: Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Tokens: Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Character Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Blocks and Indentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Variables, Objects & Data Types 21


What are Objects & Variables? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Variables & Assignment Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Built-in Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Type Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Type Casting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Mutable & Immutable Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Input / Output 31
How to Accept User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Displaying Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Operators & Expressions 35


Introduction to Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Assignment Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Identity Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Membership Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Operator Precedence with Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Errors & Exception Handling 49


Error Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

i
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Syntax Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Runtime Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Logical Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Control Flow 57
Introduction to Control Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Sequential Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Selection Statements: if .. else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Iteration: for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Iteration: while . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Jump Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Nested Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Strings 71
Strings: Introduction & Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Accessing Characters of a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
String Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Introduction to String Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Convert Case of Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Check Characters of a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Split a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Strip Characters from a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Check Prefix or Suffix in a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Find & Replace Characters in a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Traversing a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

List 83
What is a Python List? How to Create a List? . . . . . . . . . . . . . . . . . . . . . . . . 83
Accessing Items of a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Modifying a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Removing Item from a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
List Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Traversing a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Built-in Functions that can be used for a List . . . . . . . . . . . . . . . . . . . . . . . . 88
Introduction to List Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Adding Items to a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Removing Items from a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Counting or Locating Items in a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Reversing Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Sorting a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Copying a List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Nested List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
List Comprehension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Sample Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Tuple 97
List vs Tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
How to Create Tuple? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
What is a Singleton? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Accessing Items of a Tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Tuples are Immutable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Tuple Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Traversing a Tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Built-in Functions that can be used for a Tuple . . . . . . . . . . . . . . . . . . . . . . . 101
Locating Items in a Tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Counting the Occurrence of an Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
New Tuple with Reversed Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

ii
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

New Tuple with Sorted Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102


Nested Tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Understanding the Immutable Nature of Tuples . . . . . . . . . . . . . . . . . . . . . . . 103

Dictionary 105
What is a Dictionary? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
How to Create a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Accessing Items (Key:Value) of a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . 106
Updating a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Removing an Item (Key:Value) from a Dictionary . . . . . . . . . . . . . . . . . . . . . . . 108
Dictionary Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Traversing a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Built-in Functions for a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Creating a Copy of a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Nested Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Sample Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Python Standard Library 115


Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Type Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
I/O Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Base/Unicode Conversion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
What are Built-in Modules? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
math Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
random Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
statistics Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

File Handling 123


File Handling in Python - Introduction & Overview . . . . . . . . . . . . . . . . . . . . . . 123
Text Files vs Binary Files - Use Case, File Formats, Examples . . . . . . . . . . . . . . . . 123
File Opening & Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
File Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Writing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Reading & Writing Binary Files using pickle Module . . . . . . . . . . . . . . . . . . 129

Reading & Writing a CSV File using csv Module . . . . . . . . . . . . . . . . . . . . . 131

User Defined Functions, Modules & Packages 135


User Defined Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Function Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Parameters and Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Scope of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Passing Objects of Mutable Type to a Function . . . . . . . . . . . . . . . . . . . . . . . 139
What is a Module? How to Create a Module? . . . . . . . . . . . . . . . . . . . . . . . . 140
Executable Scripts / Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
What is a Package? Introduction to PyPi. How to Create a Python Package? . . . . . . . . 142

iii
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

iv
Introduction

Introduction to Programming Languages


In today’s digital era, we depend on computers, smartphones and the internet to perform a plethora of
tasks, like:

• A mathematical task, such as finding the square root of a number or solving a set of simultaneous
equations.
• A text-based task such as reading a document and performing search/replace.
• Streaming and playing multimedia files containing audio and video.
• Using a search engine to find and visit a website.
• Playing an online multiplayer game with friends.
• and many more…

Softwares play an important role as they translate human activity into corresponding machine instructions
which are executed to accomplish these tasks.

A software is a collection of programs where each program provides a sequence of instructions


specifying how the computer should act.

These instructions have to be provided in machine language or low level language (0s and 1s) that is
difficult to read or write for a human being.

This led to the invention of high-level programming languages in which programs can be easily written
and managed. The human-readable programs written using high-level languages are converted into
computer-readable machine code or bytecode using compilers or interpreters.

There are many high-level programming languages that are currently in wide use.

Some of the popular languages are Java, C, C++, C#, Go, Swift, JavaScript, PHP, Dart, Kotlin and
Python.

Introduction to Python
Guido van Rossum started the development of Python in December 1989. He released the first version
(0.9.9) of Python for general public on February 20, 1991.

The language evolved over the next few decades and so did its definition, the current version of which
is stated below:

Python is a high-level, interpreted, object-oriented programming language with dynamic


semantics.

Let us break down and analyze the above definition to gain a better understanding of Python:

High-level

Python is a high-level programming language which can be used to write a program in natural language
(english) making it readable, writable, shareable and manageable.

1
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

While developing a Python program one is not required to handle the various components of computer
architecture like registers, memory addresses and call stacks which have to be handled if an assembly
language or a low-level language is used for development.
Python includes high-level language features like variables, data structures (lists, dictionaries, etc.),
objects, expressions, modules, classes, functions, loops, threads, file handling, string handling, error
handling and other computer science abstraction concepts.
Interpreted
In traditional programming languages like C or C++, codes are compiled into computer-readable machine
code before it can be executed.
Python is an interpreted language where the Python interpreter reads and executes the program line
by line.
The process is more time consuming compared to compiled code execution, but allows faster develop-
ment as one does not have to go through the entire compilation step during testing and debugging.
Also, the code can run on any platform as long as it has a valid Python installation (which includes
interpreter) as there is no generation of platform dependent binaries.
Object-oriented
Python does not enforce Object-oriented programming (OOP), but completely supports it.
A programmer can define Classes specifying the data in the form of attributes (or properties) and some
programming logic in the form of member functions (or methods). Once a class is defined, the user can
create an instance of that class which is known as an object.
In Python, everything ( int , list , dict , etc.) is an object. We will cover more about objects in
detail in the later sections.
Dynamic Semantics
As Python is an interpreted language in which the code is executed line-by-line, a python statement or
expression is evaluated during run-time. This allows dynamic typing (type of a variable can change over
its lifetime) and creation of dynamic objects during run-time, which provides more flexibility, usability
and fewer lines of code as compared to statically-typed compiled languages like C/C++.

Advantages of Python
The key advantages of Python are as follows:
1. Easy to Learn
The Python programming language is easy to learn with low technical and conceptual overhead. This
makes it an ideal language for beginners to learn programming.
2. Clear Syntax & Fewer Lines of Code
Python’s simple and easy to learn syntax increases code readability and leads to fewer lines of code.
A typical task which requires an average of twenty lines of code in C and seven in Java can often be
done with just one line in Python.
Also, due to fewer lines of code the chances of making any error is significantly reduced.
3. Open Source
Python is an open source programming language, so anyone can view and contribute to its source
code.
4. Portable & Platform Independent
The Python programming language is portable & platform independent as it can work on any Linux,
MacOS or Windows device.
5. Standard Library & Python Packages

2
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Python has a rich and extensive Standard Library, a collection of predefined functions for various tasks.

Python programmers also have at their disposal the vast ecosystem of more than 250,000 commu-
nity contributed libraries in the Python Package Index (PyPI), where one can find a solution to every
conceivable task.

6. Web Application Development

Some of the most popular web development frameworks (django, flask, etc.) are written in Python. This
coupled with the availablity of packages to connect to any database makes Python a great choice for
web application development.

Installing Python in Windows

Let’s start with the Python 3 installation process on Windows operating system.

Step 1: Download Installer

Download the latest Windows installer from the Python Software Foundation website.

Step 1: Download Installer

Step 2: Install Python 3

Once the download is complete double-click and run it.

3
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Step 2: Install Python 3

Select the checkbox ✅ Add Python 3.9 to PATH . This will enable you to install python packages
and run python script via command-line.

Hit � Install Now and complete the setup.

Step 3: Verify Installation

Once the setup is complete, click on the Start menu and open Python 3.9 -> IDLE (Python 3.9 64 bit)
to launch the Python interpreter.

Step 3: Launch Python Interpreter

Python 3.9 is now successfully installed on your computer.

4
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Step 3: Verify Installation

Installing Python in macOS (Apple)

Let’s start with the Python 3 installation process on macOS operating system.

Step 1: Download Installer

Download the latest macOS installer from the Python Software Foundation website.

Step 1: Download Installer

Step 2: Install Python 3

Once the download is complete double-click and run it.

5
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Step 2: Install Python 3

Hit Continue and complete the setup.

Step 3: Verify Installation

Once the setup is complete, click on the Launchpad -> IDLE to launch the Python interpreter.

Step 3: Verify Installation

Python 3.9 is now successfully installed on your computer.

Execution Modes
After installing the latest version of the Python interpreter, we can now write and execute some basic
Python codes.

There are two ways to execute a Python program:

1. Interactive Mode: When the IDLE application is launched, the Python interpreter or the Python
shell pops up on the screen. User can interact with the Python interpreter and execute statements
(single line or multiline code snippets) directly in this Python shell.
2. Script Mode: This is the most commonly used method for executing a Python program. The
entire Python program is written and saved in a file ( .py extension) which can be executed
using the IDLE application.

6
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Interactive Mode of Execution


Let us execute some basic Python statements and interact with the Python shell.
Launching the Python Shell

To launch the IDLE application click [Windows Start Menu Button] -> [Python 3.9 Folder] -> [IDLE (Pyth
.

Launch IDLE

The Python interpreter or the Python shell will pop-up on the screen.

Python Shell

The version ( 3.9 ) of the Python interpreter is displayed at the top of the window followed by the >>>
symbol which indicates that the interpreter is ready to take instructions.
Python commands or statements can be input on this prompt. The input statements are executed
instantaneously and any variable assignments are retained as long as the session is not terminated.
Basic Arithmetic
Let us perform some basic arithmetic operations in the interactive mode using an integer number ( 2 )
and a floating-point number ( 3.5 ):
>>> 2 + 2
4

7
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

>>> 2 * 3.5
7.0

It can be observed that the results of each of the above computations are displayed immediately in the
shell.

Storing Values/Results

Instead of immediately displaying the results, they can also be stored in variables using the assignment
symbol ( = ) as shown below:
>>> a = 2 + 2
>>> b = 2 * 3.5

The values of a and b can be accessed later for future calculations as shown below:
>>> a
4
>>> b
7.0
>>> a * 5
20
>>> b / 3
2.3333333333333335

Basic String Operation

Interactive mode is not just restricted to basic arithmetic or assignments. Let us join two strings -
"Hello, " and "world!" .
>>> "Hello, " + "world!"
'Hello, world!'

The complete functionality of Python is easily accessible to a user via the Interactive Mode.

This makes it convenient for testing and instant execution of small code snippets (single line or few lines
of code), a feature not available in compiled languages like C, C++ and Java.

But, the statements cannot be saved for future use and have to retyped for re-execution. This disadvan-
tage is overcome by the use of Python in Script Mode as described in the next section.

Script Mode of Execution

To write reusable codes, script mode is the most preferred mode of code execution.

File Creation

To create a new file using the IDLE application click [File] -> [New File]

8
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Create New File

Write a simple Python program as shown below


a = 2 + 2
a

and save the script as example.py ( .py file extension for all Python scripts) using
[File] -> [Save As...]

Save File

Script Execution

Now run this script using [Run] -> [Run Module] .

9
�㶻 github.com/animator/learn-python · �㰐 edpunk.com Ankit Mahato

Execute File

It can be observed that the code has been executed, but no output is displayed on the console (or the
standard output) as all outputs have to be explicitly specified when running a code in the script mode.
This can be done by using the print() function which is used in Python scripts to display output on
the output stream. Let us quickly add the print() function in the above code and execute it.
a = 2 + 2
print(a)

Now, when you run the script you will observe that the value of a , that is 4 , is now displayed on
the console.

10
Another Random Scribd Document
with Unrelated Content
Lands set apart by law for the bardic orders, 490
Lappenberg, a German traveller, 626
Lasserian, St., 196
Latin language nearly allied to Celtic, 11
Latin, first poems made in, in Ireland, 149; familiar to the Irish, 530;
works translated from, 572, 598; the late bards knew, 603; rhymed
verses in, 482-3
Laurence of Durham, 164
Laurence O'Toole [or Tuathail], St., 211, 238
Lavarcham, or Leborcham, 303 ff., 343
Law, how administered in Ireland, 584 ff.; see "Brehon"; specially
enacted, 587; books of, very numerous, 590
Laymen scholars, 455
"Lay of the Heads," 353
Layamon, 272
Leabhar Breac, the, 138, 150, 151, 157, 164, 173, 257; when
copied, 470, 489
Le gach boin a boinin, 176
Leabhar na Féinne, 499
Leabhar gabhála, 281, see "Book of Invasions"
Leabhar na h-Uidhre, 70, 168, 264, 366, 380, 388, 405, 444; when
compiled, 207
Lecky, Mr., 623
Ledwich, 135-6, 185
Lecan, book of, 59
Lee, as a surname, 13
Leinster, book of genealogies, 59
Leinster, the Boru tribute imposed on, 393 ff.
Leprecháns, King of the, his journey to Emania, 401
L'Estrange as a name, 577
Letters in Ireland, 105 ff.; ogam letters, 113
Lhuyd, 4
Liath Macha, the, 345, 350-351
Liber Hymnorum, 146, 149, 165, 180, 202, 444, 480, 485
Liber Dubhdaleithe, 39
Linche, Dominicke, 611
Lindon, Patrick, poet, 605
Lismore, college of, 211
Lisnacroghera, bronze sword-sheaths of, 455
Lives of the saints, 239; list of them, 35; number still extant, 574
Livy on the Celtic wars, 8
Loch Cé, annals of, 28, see "Annals"
Loch Corrib, whence called, 48
Loch Derg, 467
Lochlannachs, the, in poetry, 499
Logographers, the Greek, 51
Lombards, the, 208
Lombard, Peter, archbishop of Armagh, 560 ff.; on the Irish
language, 617
Longarad, St., books of, 264
Lorica, St. Patrick's, 146
Lothaire, King of France, 208
Love of Dubhlacha for Mongan, 403, 634
Lowry, or Labhraidh, the mariner, 25, 401, 408
Lucan, 94
Lucian, 79; description of Gaulish god Ogmios, 114
Lugh the Longhanded, 47, 78; dies, 80; reappears, 81, 262; in saga,
286 ff.
Lughaidh [Lewy], son of Ith, 44, 244
Lughaidh, son of Curoi, 342 ff., 357
Lughnasa = August, 48
Lugudunum, or Lyons, 80, 262
Lughar, a poet, 245
Lyons, see "Lugudunum"
Luguædon, 107
Lynch, John, 554

M
Mac Adam, Mr., 375
Mac Allans, the, of Scotland, 67
Macalister, on ogams, 120
Macaulay, 511
Mac Auliffes, the, 61, 64
Mac-an-Bhaird, or Ward, Father Hugh, 574
Mac Brodin, see "Teig"
Mac Brody, Conor, historian, 578
Mac Cabe, poet, 605
Mac Carthys, the, 32, 58, 64, 67, 205, 479; of Duhallow, 61;
Riabhach, 61; genealogy of Mac Carthy, Mór, 61
Mac Carthy, Cormac, King of Munster, 213
Mac Carthy, Diarmuid, poet, 593
Macha, 53, 54; her curse on Ulster, 294; saga of, 402
Mac Cathmhaoil, Hugh, archbishop, author, 571
Mac Ceibhfinn, poet, 545
Mac Con, High King, 32, 60, 67
Mac Comber's Christian Remembrancer, 626
MacConmara, Donough, poet, 602
Mac Coise, poet, 434, 447
Mac Coise, tale of, 278
Mac Craith, wars of Thomond, 466, 470, 582
Mac Curtin, Hugh, poet, 599
Mac Curtin, Andrew, poet, 49, 50, 546
Mac Curtin, Hugh, óg, poet, 470
Mac Cuairt, poet, 605
Mac Cumhaidh, Art, poet, 605
Mac Dáire, see "Teig"
Mac Datho's pig and hound, 354
Mac Davids, the, 62, 64
Mac Dermot, 28; Mac Dermot, Roe, 66, 599
Mac Dermots, princes of Moylurg, 33, 66, 204, 527
Mac Dermot, writes in Latin, 530
Mac Dermot, prince of Coolavin, 575
Mac Donnell, John Clarach, 600
Mac Donnell, Captain Alexander, book of, 471
Mac Donnells, the, 60, 546
Mac Donalds, the, 33
Mac Donaghs, the, 33, 66
Mac Donald, Alaster, 568 ff.
Mac Dugalds, the, 33
Mac Egan, Flann, Brehon of Ormond, 421, 578, 615
Mac Eochaidh, or Keogh, Donogh, poet, 475
Mac Finneens, the, 61, 64
Mac Firbis, Duald, 52, 206, 421; his Book of Genealogies, 73; its
size, 562; on the Irish historians, 74; his life and works, 562 ff.
Mac Gee, D'Arcy, poem, 88
Macgeoghegan, Connell, or Mac Echagain, Connla, 207, 227, 616
Mac Gilla Patrick, 610
Mac Gilla Keefe, poet, 432 ff.
Mac Giolla Meidhre, poet, 601
Mac Gilla Cody, Richard, author, 572
Mac Grath, Andrew, poet, 604
Mac Graths, the, 524
Mac Govern, poet, 605
Macgregor, dean of Lismore, 271, 426, 492, 506, 508
Mac Hale, archbishop, 511
Mac Innes, Gaelic stories, 371
Mackenzie's "Sár-obair," 543
Mac Laughlin, P. O'C., 190
Mac Liag, poet, 428, 430 ff.
MacLeod, Mary, poetess, 543 ff.
Mac Leod, D. B., poet, 550
Mac Mahons, the, 33, 67
Mac Murroughs, or Murphys, the, 31, 610
Mac Namee, Brian, poet, 520
Mac Neill, John, 559
Macpherson's Ossian, 628
Mac Raicin, story of, 559
Mac Regol, Gospels of, 268
Mac Ritchie, Mr., 371
Mac Roth, Mèves messenger, 336
Mac Robartaighs, the, 175
Mac Rories, the, 33
Mac Sweeny [Mac Suibhne], poet of Connacht, 605
Mac Vuirichs, bards of Clanranald, 568
Machut, St., 199
Madden, Dr. Samuel, 623
Maelruain, 209
Maelsuthain O'Carroll, 141, 213
Maeldubh, or Maelduf, 221
Maelfathartaigh mac Ronain, death of, 403
Maelsheachluinn, pronunciation of, 431
Maelbrigte Ua Maelruanaigh, scribe, 463
Maedhóg, or Mogue, life of, 85
Magennises, the [Mac Aonghusa], 66
Maguires [MacUidhir or Meguidhir], the, 33, 60, 67, 522, 536
Maguire, of Inniskillen, satirised, 476
Maguire, Cathal, annalist, 470
Maguire, Cuchonnacht, lord of Fermanagh, 519, 523
Maineach, [O'Kelly's Country], 59
Mailmura of Fahan, poet, 427
Malachy [Maoilsheachlainn], King, 447
Malachy O'Morgair, 208
Malcolm IV., of Scotland, 34
Manannán, 54, 81, 99, 102
Mangan quoted, 221, 432, 523
Mannus, 59
Manuscripts, illuminated, 461
Maolmordha MacSweeny's house described, 520
Marainn Phadraig, the, 148, 270
Marco Polo in Irish, 572
Maundeville's travels in Irish, 572
Marianus Scotus, 209, 449 ff.
Martyrology of Tallaght, 151; by whom composed, 209
Mary of the Gael, the, 162
Marseilles, trilingual, 310
Masters, see "Annals of the Four Masters"
Maud, modern form of Mève [Meádhbh], 26
Masree, bardic college, 490
Max Müller, 270
Meath, book of, 59; made into a province, 29
Memory for ancestors, 72; Celtic memory is long, 271
Meehan, Father, 567
Menapii, the, 19
Merlin the prophet, 210
Metempsychosis, Irish belief in, 95, 381, 400
Metal-work, Irish, 456 ff.
Metre, poems dependent on, 273 ff.; no alteration of feet, beat, or
stress, in Irish metres, 408; metre of the Féilirè, 413; of Saltair na
Rann, 414, 418; Droighneach metre, 479; metres of the bards, 487;
classical metres merge in popular, 497; the Ossianic metres, 510,
513; Dr. MacHales, id.; Little Rannaigheacht, 526; Great R., 530;
Roman metres, 530; Seadna and great Séadna, Ae-fri-Slighe, Great
and Little Deachna, 531; how to read the classical metres, 532, 545;
necessitate condensed thought, 537; examples of late metres, 548
ff.
Metrical text books, 241 ff.
Mève or Méadhbh, 26; how pronounced, 31; in topography, 57; in
saga, 319 ff.; furious temper of, 323; fights like Boadicea, 335; she
and Oilioll receive the Firbolg, 283
Mève's poem on Cuchorb, 273 ff.
Meyer, Kuno, Dr., 41, 86, 97, 114, 301, 354, 411, 413; on Irish
scansion, 232-3
Mi-chuarta or Midh-Chuarta, the house of, 32, 248
Midir, 102
Middle-Irish, 268
"Midnight Court," the, 601
Migne, 203
Milan, Irish MSS. in, 267
Mill first, in Ireland, 32
Miledh Easpáin, 46
Milesius, Latinised form of Miledh, 17; his genealogy, 45; his son
Donn addressed as a god, 49, 50, 77
Milesians, different dates assigned to their landing, 17, 60; by what
route did they come, 18 ff.; their characteristics, 563
Milton, 569
Missal, ancient Irish, 436
Missionaries, British, in Ireland, 106
Missionaries, Irish, abroad, 223, 488 ff.
Mobhi, St., school of, 168, 196
Mochuda, St., or Carthach, 211, 233
Modan, poet, 246
Moengal of St. Gall, 448
Molesworth, Robert, 621
Moling, St., 209, 210, 236 ff. 394
Molaise, St., 174, 177, 178
Momera, courtship of, 402
Monasterevin, 153
Monasteries, rival, fight, 234; established by Irish monks on the
Continent, 449, 451
Montrose's wars in Gaelic 568
Montelius, Prof., 124
Mongan, 99, 380, 403; Dallán and Mongan, 410 ff.; "Love of
Dubhlacha" for, 634-5
Moran, the jurist, 246
Moran, Cardinal, 198
Moreen ni Culenáin, air, 549
Moore, Irish History, 65; his melody, "Rich and Rare," 444
Morini's life of St. Cathaldus, 211
Morighan, or Mór-rigu, the, war-goddess, consorts with the Dagda,
288; assists the Tuatha De Danann, 291; is wounded by Cuchulain,
325; speaks to the Dun Bull, 339; cry of, 478
Mountjoy, Lord, 476, 564
Moville, school of, 167, 209
"Mower, the," a poem, 604
Moy [mágh] Bolg, massacre of, 29
Moy Cullen, whence called, 48
Moy Léana, battle of, 31, 368
Moy Mell, 99, 199, 201
Moy Muirtheimhne, Great Breech of, 326
Moy Mochruime, battle of, 32, 60, 355, 376; date of, 380, 382
Moy Rath, battle of, 382, 403, 413
Moytura, first battle of, 284
Moytura, battle of South, 80, 116, 289 ff.
Moy Slaught or Sleacht, 84, 85
Mucaille, bishop, 158
Muiredach takes the surname Mac Carthy, 61
Muirchu Maccu Machteni, his life of St. Patrick, 136, 142, 148, 151
Muircheartach Mór mac Earca, 232
Muircheartach of the Leather Cloaks, 428
Muirthemni, derivation of, 49
Muiredach Mac Robertaigh, see "Marianus Scotus"
Munster, book of, 59; the two Munsters, 29
Mura, St., 167, 182
Muratori, 149
Murough, or Murrough [Murchadh], son of Brian Boru, 440
Murough the Scotchman, see "O'Daly," 492
Murphy, John, poet, 604
Murphy, Father Denis, 564
Murphys, the, see "Mac Murroughs"
Music, Irish, 463
Musicians in Ireland, 496
Myth, runs into history, 57
Mythology, Hellenic and Teutonic, 78
Mythological cycle of sagas, 271 ff.

N
Names of Ireland, various, 20
Names, Christian, disused, 162; the Irish ordered to adopt English
names, 609; the Normans change their names, 609
"National" Schools, the, x, xi, 220
National Board, unsympathetic teaching of, 162, 179, 606; sets itself
to exterminate the Irish language, 630 ff.
Navigatio Brendani, 198
Nechtan's dún, 111
Neith, god of battle, 54
Neide, 240, 245
Nemedians, the, 47, 82, 280, 430
Nemon, wife of Neith, 54
Nennius the Briton, 18, 46, 47; Irish translation of, 48
Netlau, Max, 328
Netterville, poet, 605
New Grange, 48, 454
Newfoundland, 603
Niall of the Nine Hostages, 33, 34, 60, 65, 71, 75, 166, 446, 452,
515, 527, 579, 603
Niall of the Black Knee, 35, 58, 425
Niamh, Cuchulain's sweetheart, 346
Nice, Council of, 202
Nigra, Constantine, 596; on the Celtic invention of rhyme, 481; on
the monks' ode to the blackbird, 485
Nile, the, Irish sail up it, 223
Ninian, St., 194
Ninnidh, St., of Loch Erne, 196
Nindid "the scholar," 161
Niul, son of Fenius Farsa, 45
Noli pater, Columcille's, 181
Nomad, a measure of time, 84
Norman invasion, the, its effects, 453 ff; arrests Irish development,
463; effect on the bards, 491
Norman ancestry of Keating, 553, 556; Norman names amongst the
Irish poets, 493
Norsemen destroy the church shrines, 457, see "Danes"
Normans, see "Anglo-Normans"
Norwegians, or "white foreigners," 435
Nuada of the silver hand, 284 ff.
Nugent of Delvin, poet, 492
Nugent, Robert, S.J., 612
Nuts, mystic, 447
Nutt, Alfred, 88, 95, 635; on the Fenians, 371, 379

O
Oak-tree, the, 169, 170
Oath by the elements, 25, 28, 88
O'Briens, the, of Thomond, 35, 64, 452, 493, 518
O'Brien, Turlough, exploits of, 470; see "Caithréim"
O'Brien Donough, earl of Thomond, hangs three poets, 493
O'Brien Donough, fourth earl, 515, 518
O'Brien, Turlough, poet, 516
O'Brien, Murrough, 569
O'Brien, Father E., theory on St. Patrick, 137
O'Brien, Patrick, Irish printer, 601-2
O'Bruadar, David, poet, 592, 615
O'Byrnes, the, 31, 544, 610; their poets, 472 ff.; their generosity,
475; ode to, 46
O'Byrne, Rose, burnt alive, 474
O'Byrne, Fiach, 475
O'Callaghans, the, 32, 61, 64, 477
O'Cassidy, Gilla Maduda, poet, 441, 446
O'Cavanaghs, 60, 64, 68, 75, 473
O'Carrols, the, 32, 58
O'Cainte, Fearfeasa, poet, 516, 535
Ocha, battle of, 579
O'Cleary's, the, Ch. III n.24
O'Clerys, or O'Clearys, antiquarians of Ulster, 154, 264; poets, 524,
573
O'Clery, Lughaidh, poet and historian, 516, 564 ff.
O'Clery, Michael, Book of Genealogies, 68; poem copied by, 170;
Féiliré, 231, 239; on the dispersion of the old books, 266; lives of
the saints, 406; Book of Invasions, see sub voce; his life and works,
573-580
O'Clery, "Adventures of Edmund," 597
O'Clery, Conary, 575; Peregrine, one of the Four Masters, 577
O'Coffeys, the, 524
O'Coffey, Malachy, poet, 474
O'Conors of Connacht, the, 33, 60, 64, 204, 206, 452, 515, 527, 545
O'Conors of Belinagare, poem to their house, 545 ff.
O'Conors of the South, the, 32
O'Conor Faly, 31, 610
O'Conor Turlough, High King, 34
O'Conor, Charles, of Balinagare, 341, 578; on the wars of the Gael
and Gaill, 434; on Carolan the harper, 497; on O'Curneen's poem,
546
O'Conor Kerrys, 66
O'Conor, Roderick, last High King of Ireland, 34
O'Conor, Rev. Charles, 578, 580
O'Conor Don or Donn, 34, 65; the O'Conor Don, 65; his MSS., 471,
559
O'Conor, Sligo, 545
O'Connor, Dermot, translator of Keating, 558
O'Connell, Daniel, physiognomy of, Ch. VI n.6; his descent, 64, 65;
failed to encourage the national language, 626
O'Conollys, the, 35
O'Coileáins or Collinses, 62
O'Cronins, 62
O'Crowleys, 65
O'Curneen, Father Patrick, Poet, 545
O'Curry, Eugene, xi, 116, 117, 137, 154, 211, 606; his list of lost
books, 265; on the number of existing Irish sagas, 279, 358, 404,
426, 433; on some poems in Book of Leinster, 471; on ocht-foclach
metre, 544; on Mac Firbis's genealogies, 564; his work on the
Brehon Law, 583
O'Dalys, the, 62, 64, 544
O'Daly, Donogha Mór, of Boyle, poet, 271, 466 ff.
O'Daly, Cuchonnacht, Book of, 439
O'Daly, Fergal, poet, 470; Maurice, ditto, 470; Dermot, ditto, 470
O'Daly, Angus, poet and satirist, 473, 476 ff.
O'Daly, Murrough, poet, 568; story of, 491 ff.
O'Daly, John, printer and publisher, 602; his "Irish Jacobite poetry,"
596, 599
O'Deorans, the, Leinster antiquarians, 154
O'Donnells, the, 35, 60, 64, 65, 167, 516, 564
O'Donnell's Life of Columcille, 157, 177, 189
O'Donnell, present bishop of Raphoe, 180
O'Donnell's Kerne, story of, 404
O'Donnell, Hugh, poet, 516
O'Donnell, Manus, 527
O'Donnell, Red Hugh, 564 ff.
O'Donnell, John Francis, English poet, 575
O'Donnell, General, 622
O'Donnell, John Clárach, poet (read Mac Donnell), 600
O'Donnell's quarrel with Murrough O'Daly, 491 ff.
O'Donnellan, Brian, poet, 520
O'Donoghue, of the Glen, 62; Mór, 62
O'Dogherties, the, 62
O'Donovans, the, 62
O'Donovan, John, 66, 72, 107; his Satires of Angus O'Daly, 491;
prosody, 540; his edition of the Four Masters, 578 ff.; his work on
the Brehon Law, 583; on the word troithlighe, 475
O'Dowdas, the, 33
O'Driscolls, the, 58, 67, 535
O'Dugan, John, mór, poet, 469 ff.
O'Duigenan, one of the Four Masters, 577
O'Dunn, Gilla-na-naomh, poet, 447
O'Flaherties, the, 33, 60
O'Flanagan, Theophilus, 28, 310, 505, 517
O'Falvies, the, 65
O'Flannghaoile, Mr., 601, 603
O'Farrells, the, 66, 315
O'Flynn, poet, see "Eochaidh"
O'Gara, Friar, collection of poetry, 471
O'Gara, Fergal, patron of the Four Masters, 576, 578
O'Gara, of Coolavin, 66
O'Garas, the, 32
O'Gallaghers, the, 65
O'Garvans, the, 62
O'Gallagher, bishop of Raphoe, sermons, 600
O'Grady, Standish Hayes, [Standaois Aodh O'Grádaigh] on Ossianic
poetry, 499, 506; on the Midnight Court, 602; his "Silva Gadelica"
quoted passim.
O'Gnive, poet, 522, 537
Ogam writing, 105, 107-108 ff.; 133, 458, 487
Ogma, the god, 113-15, 285
O'Gormans, the, 31
O'Haras, the, 32, 521
O'Hanlons, of Orior, the, 33
O'Harts, the, 35
O'Halloran, the historian, 525; his history of Ireland, 211, 364
O'Hartigan, Dunlang, 440
O'Hartigan, poet, see "Cinaeth"
O'Hanlon, Father John, Lives of the Irish Saints, 198
O'Hehirs, the, 62
O'Heynes, the, 33
O'Heffernan, poet, 604
O'Hĭginses, the, 524
O'Hĭgrinn Teig, [Tadhg] Dall, poet, 519, 537
O'Hĭginn, Conor, poet, 520
O'Higgin, or Hĭginn, John, poet, 473
O'Huidhrin, poet, 469
O'Hussey, Maelbrigte, 612
O'Hussey, Eochaidh, poet, 474, 519, 523 ff.
O'Hussey, Bonaventura, poet and author, 534
Oilioll, husband of Mève, 319 ff.; 354 ff.
Oirfideadh, a musician, not a poet, 496
Oilioll Olum, King of Munster, 31, 58, 60, 62; a poet, 246
O'Keefes, the, 32, 62, 64
O'Keefe, Father, poet, 604
O'Keefe, Art óg, 516
O'Keefe, Donal óg, slain at Aughrim, 64
O'Kellys, the, 60, 67, 205, 283, 612
O'Kelly, of Bregia, 35, 610
Ollamh, or Ollav, his inauguration ode to a prince, 28; training of an,
278, 401, 488; the head of the filés, 488
Ollamh, grandson of Ogma, 52
Ollamh Fodhla, 245
O'Learys, of Roscarbery, 67
O'Longan, Micheál óg, poet, 547
O'Looney, Brian, 546
O'Lochain, 441, see "Cuan"
O'Lugair, 273
O'Longan, scribe, xi
O'Mahony, John, the Fenian, 179, 364, 558
O'Mahonys, Finn and Roe, the, 62; of Carbery, ditto.
O'Malone, 206
O'Mahon, a scribe, 228, 341, 403
O'Mellon, friar, narrative of, 568
O'Meaghers, the, 32, 477
O'Meehans, the, 62
O'Melaughlins, the, 206
Omens, Cuchulain's evil, 343, 347
O'Mores, the, 66, 315, 473, 610
O'More, Rory, 615
O'Moriartys, 62
O'Mullane, 62, 64
O'Mulconreys, the, 524, 545
O'Mulloy's prosody, 537, 572; his "Lamp of the Faithful," 572;
grammar, id., 617
O'Mulchonry, one of the Four Masters, 575
O'Mulconry, Maurice, aided the Four Masters, 575
O'Mulchonry, Tanaidhe, poet, 446
O'Neill, abrogates his title, 527, 529
O'Neill's, the, 35, 58, 60, 64, 65, 74, 452, 515
O'Neill, Owen, 614-5
O'Neill, of Clanaboy, 623
O'Neill, Shane, 65
O'Neills, wanderings in 1607, 566
O'Neaghtan, John, poet, etc., 597 ff.
O'Neaghtain, or O'Naghten Teig, poet and lexicographer, 599
O'Pronty, Patrick, 258
O'Rahilly, poet, 604
Ordeal, druidic, 90
Orbsen, 48

You might also like