Access free live classes and tests on the app
Download
+
Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA
Login Join for Free
avtar
  • ProfileProfile
  • Settings Settings
  • Refer your friendsRefer your friends
  • Sign outSign out
  • Terms & conditions
  • •
  • Privacy policy
  • About
  • •
  • Careers
  • •
  • Blog

© 2023 Sorting Hat Technologies Pvt Ltd

  • Exams
    • SBI Exams
      • SBI PO
      • SBI Clerk
      • SBI SO
    • IBPS Exams
      • IBPS PO
      • IBPS Clerk
      • IBPS RRB
      • IBPS SO
    • LIC Exams
      • LIC Assistant
      • LIC AAO
      • LIC ADO
    • RBI Exams
      • RBI Grade B
      • RBI Assistant
  • Notifications
    • Upcoming Bank Exam
    • Syllabus
      • IBPS Syllabus
        • IBPS PO Syllabus
        • IBPS Clerk Syllabus
        • IBPS RRB Syllabus
        • IBPS SO Syllabus
      • SBI Syllabus
        • SBI PO Syllabus
        • SBI Clerk Syllabus
      • LIC Syllabus
        • LIC Assistant Syllabus
        • LIC AAO Syllabus
        • LIC ADO Syllabus
      • RBI Syllabus
        • RBI Assistant Syllabus
  • Study Material
    • Magazine Download
    • Bank Exams Notes
  • Tests & Practice
    • Scholarship Test
    • Test Series
    • Learning Festival
  • Rankers Guide
    • Paper Analysis
Bank Exam » Bank Exam Study Materials » Computer Knowledge » Notes on Python
insurance_banking_exams

Notes on Python

Complete summary of PYTHON. Features and facts of PYTHON. Brief info on PYTHON identifiers, reserved words, line and indentations, data types and code blocks.

Table of Content
  •  

Python is a programming language that is high-level, interpreted, dynamic, and object-oriented. Python is meant to be a very easy – to – understand language. It generally uses English terms rather than punctuation, and it has limited vocabulary structures than other languages.

Among Python’s features are:

  • Easy-to-understand Python features a small number of keywords, a straightforward structure, and a well-defined syntax. This enables the pupil to swiftly learn the language.
  • Easily readable Python code is easier to read and understand since it is more clearly stated.
  • Python’s source code is quite straightforward to maintain.
  • Python has a large standard library that is particularly portable and cross-platform compatible on UNIX, Windows, and Macintosh.
  • Python features an interactive mode that allows interactive testing and debugging of code snippets.
  • Python is portable, meaning it can operate on a broad range of hardware systems and has the same user interface across all of them.

Python Environment Variables:

  • PYTHONPATH
  • PYTHONSTARTUP
  • PYTHONCASEOK
  • PYTHONHOME

Running PYTHON:

There are three methods to get started with Python.

  • Interactive Translator

Python may be run on Unix, DOS, or any other operating system that has a command-line interpreter or shell window.

$python # Unix/Linux

or

python%# Unix/Linux

or

C:> python # Windows/DOS

  • Script to run from the command line

By running the interpreter on your application, you may run a Python script from the command line, as seen below.

$python script.py # Unix/Linux

or

python% script.py # Unix/Linux

or

C: >python script.py # Windows/DOS

  • Integrated Development Environment

You can also run Python from a Graphical User Interface (GUI) environment if you have a GUI programme that supports Python on your system.

Unix- IDLE was the first Unix-based Python IDE.

Python for Windows – PythonWin is the first Python interface for Windows, and it’s an IDE with a graphical user interface.

On the command line, type python.

Python Identifiers:

A Python identifier is a name that is used to identify a variable, function, class, module, or another object in Python. An identifier actually begins with a letter from A to Z, or a to z, or an underscore (_), followed by zero or more letters, underscores, or numbers (0 to 9).

In identifiers, punctuation marks like @, %, and $ are not accepted. Python is a programming language that is case sensitive. As a consequence, in Python, ‘manpower’ and ‘Manpower’ are 2 distinct identifiers.

The naming guidelines for Python identifiers are as follows:

  • The name of the class begins with a capital letter. The commencement of all other identifiers is a lowercase letter.
  • The idea of a single leading underscore in an identifier signifies that it is private.
  • An identification that begins with two leading underscores is considered to be very secret.
  • The identifier is a language-defined special name if it also ends with two trailing underscores.

Reserved Words:

The Python keywords are shown in the table below. You can’t use these terms as constants, variables, or any other identifier names since they’re reserved. Only lowercase characters appear in the Python keywords. Examples- and, exec, assert, break, finally, for, or,  pass, class, from, print, continue, global.

Lines and Indentation:

There are no braces in Python to indicate code blocks for class and function entries or flow control. Line indentation, which is rigorously enforced, is used to denote code blocks.

The indentation could be any number of spaces, however, all statements in the block should be indented the same amount. For instance,

if True:

print “True”

else:

print “false”

The following block, on the other hand, causes an error:

if True:

print “Answer”

print “True”

else:

print “Answer”

print “False”

Data types:

  1. Numbers: Numeric values are stored using the Number data type.
  2. String: The string data type is used to record a character sequence.
  3. Tuple is an immutable data type that is used to hold a collection of multiple data kinds of items.
  4. List: The list data type is mutable and is used to hold a collection of distinct data kinds of components.
  5. Set: The set data type is used to hold a variety of element data types; it is changeable and stores unique elements.
  6. Dictionary: The dictionary data type is used to hold a collection of distinct data kinds of components as key-value pairs. It is changeable and stores a unique key.

Code block:

In Python, a code block is a group of lines of code that are all in the same block or indent. This can be encountered in a variety of places, including classes, functions, and loops.

Because they are 1) on the same indent and

 2) Are not interrupted by other lines of code on the same indent, you can tell where code blocks are.

Python code blocks are useful because they indicate which parts of a loop, class, or function will be executed.

def code_block():

   # Everything in this function is part of the same code block

    print (1)

    print (2)

for i in range (4)

# Everything in this loop is part of the same code block print (i)

Conclusion:

Python is a high-level, robust, open-source programming language that employs simple and easy-to-remember English phrases as its keywords, allowing developers to focus on the solution rather than knowing a huge number of keywords.

It is the most ideal language among others due to its rich library, support for many paradigms, GUI programming features, and integrated features.

faq

Frequently asked questions

Get answers to the most common queries related to the BANK Examination Preparation.

Is it possible to set PYTHONPATH in advance?

Ans. Yes, PYTHONPATH may be set up as a Python installer.

In Python, how do you define tuples?

Ans. In Python, a tuple is a sequence data type. Commas are used to separate the number of values in tuples....Read full

What is the purpose of the Pythonstartup environment variable?

Ans. The Pythonstartup environment variable is used because it specifies the location of the initialization f...Read full

Is there an inherent do-while loop in Python?

Ans. No

 

Ans. Yes, PYTHONPATH may be set up as a Python installer.

Ans. In Python, a tuple is a sequence data type. Commas are used to separate the number of values in tuples.

Ans. The Pythonstartup environment variable is used because it specifies the location of the initialization file containing Python source code that may be used to start the interpreter.

Ans. No

 

Crack Bank Exam with Unacademy

Get subscription and access unlimited live and recorded courses from India’s best educators

  • Structured syllabus
  • Daily live classes
  • Ask doubts
  • Tests & practice
Learn more

Notifications

Get all the important information related to the Bank Exam including the process of application, important calendar dates, eligibility criteria, exam centers etc.

Bank Exam Application Process
IBPS Clerk Notifications
IBPS Clerk Result – Check Prelims Exam Result Link
IBPS PO Notifications
IBPS PO Result
IBPS PO Syllabus 2023 for Prelims and Mains Exam
SBI Clerk Notifications
SBI Clerk Result – SBI Clerk Mains Result 2023 Out
SBI PO Admit Card 2022 – Link(Soon), Steps to Download
SBI PO Notifications 2022 – Check Eligibility, Exam Date, Syllabus, Exam Pattern
SBI PO Result
SBI PO Syllabus 2023, Prelims and Mains Syllabus in Detail
See all

Related articles

Learn more topics related to Computer Knowledge
Windows Operating System

This article discusses the Windows operating system and gives a detailed view on several versions of them. In this article you will get to know about major features and also a historical background of the Windows operating system.

What Is A Wireless Connection?

These days, hardly there's anyone who doesn't use the internet connection these days in their daily life. The Internet has become an essential part of our life because everything has gone online. From food to friends or education to entertainment, everything is present on the Internet.

WAN

This article helps us in understanding the basic meaning of the Internet's biggest WAN or Wide Area Network and the principle behind it, its applications in computer networks, its advantages, and disadvantages,

VPN

Virtual Private Network(VPN) helps guard your privacy by establishing an encrypted connection. It hides your IP address, after which no one can see or trace your activity.

See all
Access more than

12,591+ courses for Bank Exams 

Get subscription

Trending Topics

  • IBPS Clerk Exam Analysis 2022
  • Bank Exam Notifications
  • IBPS-PO Eligibility Criteria
  • IBPS PO Exam Pattern
  • IBPS PO Application Process
  • SBI Clerk Exam Pattern
freeliveclasses_bankexams

Related links

  • Bank Exam Study Materials
  • SBI Clerk Result
  • IBPS PO Syllabus
  • IBPS Clerk Result
  • IBPS PO Salary
  • IBPS Clerk Syllabus
  • IBPS Calendar 2023
  • RBI Grade B Officer
  • RRB PO Exam Pattern
  • RRB Exam Syllabus
  • RRB NTPC Exam Pattern
  • General Awareness for Bank Exams
  • RRB Clerk Exam Date 2023
testseries_bankexams
Download Free English Magazine
Company Logo

Unacademy is India’s largest online learning platform. Download our apps to start learning


Starting your preparation?

Call us and we will answer all your questions about learning on Unacademy

Call +91 8585858585

Company
About usShikshodayaCareers
we're hiring
BlogsPrivacy PolicyTerms and Conditions
Help & support
User GuidelinesSite MapRefund PolicyTakedown PolicyGrievance Redressal
Products
Learner appLearner appEducator appEducator appParent appParent app
Popular goals
IIT JEEUPSCSSCCSIR UGC NETNEET UG
Trending exams
GATECATCANTA UGC NETBank Exams
Study material
UPSC Study MaterialNEET UG Study MaterialCA Foundation Study MaterialJEE Study MaterialSSC Study Material

© 2025 Sorting Hat Technologies Pvt Ltd

Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA

Share via

COPY