5. Session Agenda
➢ Session-5
• Basic of String, Manipulating strings,
• Modify Strings, String Concatenation,
• Format – Strings
➢ Session-6
• Escape Characters,
• Inbuilt method of Strings
• Basic of Regular Expressions
6. Objectives/Key Learning Outcomes
❖ To comprehend why Python is a useful scripting language
for students and developers.
❖ Explore the various methods available for installing
Python.
❖ Learn how to verify that Python has been installed
correctly.
7. Objectives/Key Learning Outcomes
❖ Understand how to configure environment variables.
❖ Ensure that Python and its associated tools are accessible
from the command line or terminal.
❖ Gain familiarity with common issues that may arise during the
installation process.
8. Importance of the topics being covered
❑ Understanding the Language
❑ Effective Utilization
❑ Optimized Code
❑ Collaboration and Communication
❑ Adaptability to New Technologies
❑ Staying relevant in the tech industry
9. Key Concepts and Fundamentals
▪ Syntax and Basic Concepts: Variables, data types
(integers, floats, strings, booleans), operators, and
comments.
▪ Control Flow: Conditional statements (if-elif-else), loops
(for, while), and flow control statements (break, continue,
pass).
10. Key Concepts and Fundamentals
▪ Functions: Reusable blocks of code performing a specific
task.
▪ Data Structures: Built-in data structures like lists, tuples,
dictionaries, and sets.
11. Key Concepts and Fundamentals
▪ Modules and Packages: Python files containing reusable
code and directories containing multiple modules.
▪ File Handling: Built-in functions and modules for reading
from and writing to files.
12. Key Concepts and Fundamentals
▪ Exception Handling: Try-except blocks for catching and
handling exceptions.
▪ Object-Oriented Programming (OOP): Supports the
creation and manipulation of objects.
13. Key Concepts and Fundamentals
▪ Libraries and Packages: Rich ecosystem of libraries and
packages that extend its functionality.
▪ Virtual Environments: Virtual environments allow you to
create isolated Python environments for different projects.
14. Background
❑ A high-level, interpreted programming language created by
Guido van Rossum and first released in 1991.
❑ Is easy to read, write, and understand.
❑ Designed with a set of guiding principles, known as "Zen of
Python," which emphasize simplicity, readability, and
explicitness.
15. Background
❑ First version of Python, Python 0.9.0, was released in 1991.
❑ Python 1.0 followed in 1994.
❑ Python 2.0 was released in 2000.
❑ Python 2.0 introduced new features like garbage collection
and Unicode support.
16. Background
❑ Python 3.0, a major revision of the language, was released
in 2008.
❑ Python 3.0 addresses various inconsistencies and design
flaws in Python 2.x.
❑ Python 3 has become the focus of development, with Python
2 reaching its end of life in 2020.
18. Session 1- Python Features
1. Easy to Learn
✓ Simple syntax and structure
✓ Easy for beginners to learn and start coding quickly.
✓ Easy to read and understand
20. 2. Easy to Code:-
✓ Easy Syntax. Comprises words from English language.
✓ No need to take care of any opening or closing of brackets.
✓ Uses indentation (spaces or Tabs) for scope.
Session 1- Python Features
21. ✓ Eg, a simple Python program to add two numbers is as
follows:
a = 8
b = 9
print(a+b)
✓ Number of lines of code is less in Python.
Session 1- Python Features
22. 3. Interpreted language
✓ Code is not compiled at once, converted to a .exe file, and
then executed.
✓ Code is executed line by line and not all at once.
✓ This line-by-line execution makes it easy to debug the code.
Session 1- Python Features
25. 4. Free and Open Source
✓ Used for free of cost on any operating system.
✓ Can be downloaded by anyone from its official website.
✓ Allows making of own modules or libraries.
Session 1- Python Features
26. 5. Object-Oriented Language
✓ Supports object-oriented programming constructs.
✓ Easily create and use classes, objects, can implement OOP
constructs.
Session 1- Python Features
27. 6. Cross-Platform Language
✓ Python code written on one machine or operating system
can be run anywhere.
✓ Python code first is converted to an intermediate form known
as Bytecode and is then executed.
Session 1- Python Features
28. 7. Extensive feature
✓ Can be extended to become more versatile.
✓ Covers a large area in software development applications.
✓ Is adaptable to various functionalities.
✓ Can be integrated with other programming language’s code.
Session 1- Python Features
29. ✓ Programmers can write codes that are less independent of
the specific machine type.
✓ Has strong abstraction from low-level constructs of system
or machine.
✓ Developer need not be concerned about architecture, or
underlying machine type.
8. High-Level Language
Session 1- Python Features
30. 9. Databases Support
✓ Python Database API (DB-API).
✓ Databases supported by standard python:- MySQL,
PostgreSQL, Microsoft SQL, Oracle, Informix, etc.
✓ Interface for the particular database needs to be imported.
✓ Supports both relational as well as non-relational databases.
Session 1- Python Features
31. 10. GUI Programming
✓ Supports features and libraries for graphical development.
✓ System calls and procedures defined to develop an
application’s perfect GUI.
✓ Examples of Python frameworks for GUI:- Django, Tkinter,
etc.
Session 1- Python Features
32. 11. Extensible
✓ Makes use of other languages in python code possible.
✓ Can easily be embedded in existing code to make it more
robust and enhance its features.
✓ Other languages can be used to compile our python code.
Session 1- Python Features
34. 12. Portable
✓ It allows us to code once and runs anywhere.
✓ Supports valuable features of object-oriented languages-
reusability.
✓ No need not worry about the environment where it will run.
Session 1- Python Features
35. ✓ Bulk of cross-platform libraries, provides rich set of modules
and functions.
✓ Libraries compatible with various operating systems like
UNIX, Mac, windows, etc.
✓ Large number of libraries support import and use of required
functionality.
13. Large Standard Library
Session 1- Python Features
36. ✓ No need to declare the data type of a variable explicitly.
✓ Data type of variable is decided at run time.
✓ One variable can be used to store different types of data at
different instances in the program.
14. Dynamic Typed Language
Session 1- Python Features
37. Real-world Use Cases/Applications
1. Versatility: Web development, Data science, Machine
learning, Artificial intelligence.
2. Ease of Learning: Reduced cost of program maintenance.
3. High Demand in the Job Market: High applicability in various
domains.
38. Real-world Use Cases/Applications (contd.)
4. Data Science and Machine Learning: Libraries simplify
complex tasks.
5. Automation and Scripting: System administrators, DevOps
engineers, and IT professionals use for efficient workflows.
6. Cross-platform Compatibility: Flexibility
39. Interview Questions/Quiz
1. What is the primary advantage of Python's dynamic typing?
_____________________.
2. Which feature of Python simplifies the creation of graphical user
interfaces (GUIs)? ______________.
3. Python is a what type of programming Language
____________.
4. What are some Python frameworks that support GUI?
___________.
5. Name some of the databases supported by Python ________.
40. Support Material references
❑ https://www.scaler.com/topics/python/features-of-python/
❑ https://www.prepbytes.com/blog/python/features-of-python/
❑ https://unstop.com/blog/features-of-python
❑ https://www.geeksforgeeks.org/advance-features-of-python/