• Article 1 :-Reading and Writing Files

    Categories: Python ||

    The file object provides a set of access methods to make our lives easier. We would see how to use read() and write() methods to read and write files.The write() MethodThe write() method writes any st

  • Article 2 :-The close() Method

    Categories: Python ||

    The close() method of a file object flushes any unwritten information and closes the file object, after which no more writing can be done.Python automatically closes a file when the reference object o

  • Article 3 :-The file Object Attributes

    Categories: Python ||

    Once a file is opened and you have one file object, you can get various information related to that file.Here is a list of all attributes related to file object −Sr.No.Attribute & Desc

  • Article 4 :-The open Function

    Categories: Python ||

    Before you can read or write a file, you have to open it using Python's built-in open() function. This function creates a file object, which would be utilized to call other support methods associated

  • Article 5 :-Opening and Closing Files

    Categories: Python ||

    Until now, you have been reading and writing to the standard input and output. Now, we will see how to use actual data files.Python provides basic functions and methods necessary to manipulate files b

  • Article 6 :-The input Function

    Categories: Python ||

    The input([prompt]) function is equivalent to raw_input, except that it assumes the input is a valid Python expression and returns the evaluated result to you.#!/usr/bin/pythonstr = input("Enter your

  • Article 7 :-The raw_input Function

    Categories: Python ||

    The raw_input([prompt]) function reads one line from standard input and returns it as a string (removing the trailing newline).#!/usr/bin/pythonstr = raw_input("Enter your input: ")print "Received inp

  • Article 8 :-Python - Files I O

    Categories: Python ||

    Printing to the ScreenThe simplest way to produce output is using the print statement where you can pass zero or more expressions separated by commas. This function converts the expressions you pass i

  • Article 9 :-Packages in Python

    Categories: Python ||

    A package is a hierarchical file directory structure that defines a single Python application environment that consists of modules and subpackages and sub-subpackages, and so on.Consider a file Pots.p

  • Article 10 :-The reload() Function

    Categories: Python ||

    When the module is imported into a script, the code in the top-level portion of a module is executed only once.Therefore, if you want to reexecute the top-level code in a module, you can use the 

  • Article 11 :-The globals() and locals() Functions

    Categories: Python ||

    The globals() and locals() functions can be used to return the names in the global and local namespaces depending on the location from where they are called.If locals() is called from within a functio

  • Article 12 :-The dir( ) Function

    Categories: Python ||

    The dir() built-in function returns a sorted list of strings containing the names defined by a module.The list contains the names of all the modules, variables and functions that are defined in a modu

  • Article 13 :-Namespaces and Scoping

    Categories: Python ||

    Variables are names (identifiers) that map to objects. A namespace is a dictionary of variable names (keys) and their corresponding objects (values).A Python statement can access variables in a local

  • Article 14 :-The PYTHONPATH Variable

    Categories: Python ||

    The PYTHONPATH is an environment variable, consisting of a list of directories. The syntax of PYTHONPATH is the same as that of the shell variable PATH.Here is a typical PYTHONPATH from a Windows syst

  • Article 15 :-Locating Modules

    Categories: Python ||

    xWhen you import a module, the Python interpreter searches for the module in the following sequences −The current directory.If the module isn't found, Python then searches each directory in the shel

  • Article 16 :-The import Statement

    Categories: Python ||

    You can use any Python source file as a module by executing an import statement in some other Python source file. The import has the following syntax −import module1[, module2[,... moduleN]When the

  • Article 17 :-Python - Modules

    Categories: Python ||

    A module allows you to logically organize your Python code. Grouping related code into a module makes the code easier to understand and use. A module is a Python object with arbitrarily named attribut

  • Article 18 :-The return Statement

    Categories: Python ||

    The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.All the above examples are not

  • Article 19 :-The Anonymous Functions

    Categories: Python ||

    These functions are called anonymous because they are not declared in the standard manner by using the def keyword. You can use the lambda keyword to create small anonymous functions.1. Lambda forms c

  • Article 20 :-Variable-length arguments

    Categories: Python ||

    You may need to process a function for more arguments than you specified while defining the function. These arguments are called variable-length arguments and are not named in the function definition,

  • Article 21 :-Default arguments

    Categories: Python ||

    A default argument is an argument that assumes a default value if a value is not provided in the function call for that argument. The following example gives an idea on default arguments, it prints de

  • Article 22 :-Global vs. Local variables

    Categories: Python ||

    Variables that are defined inside a function body have a local scope, and those defined outside have a global scope.This means that local variables can be accessed only inside the function in which th

  • Article 23 :-Scope of Variables

    Categories: Python ||

    All variables in a program may not be accessible at all locations in that program. This depends on where you have declared a variable.The scope of a variable determines the portion of the program wher

  • Article 24 :-The return Statement

    Categories: Python ||

    The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.

  • Article 25 :-The Anonymous Functions

    Categories: Python ||

    These functions are called anonymous because they are not declared in the standard manner by using the def keyword. You can use the lambda keyword to create small anonymous functions.1. Lambda forms c

  • Article 26 :-Variable-length arguments

    Categories: Python ||

    You may need to process a function for more arguments than you specified while defining the function. These arguments are called variable-length arguments and are not named in the function definition,

  • Article 27 :-Default arguments

    Categories: Python ||

    A default argument is an argument that assumes a default value if a value is not provided in the function call for that argument. The following example gives an idea on default arguments, it prints de

  • Article 28 :-Keyword arguments

    Categories: Python ||

    Keyword arguments are related to the function calls. When you use keyword arguments in a function call, the caller identifies the arguments by the parameter name.This allows you to skip arguments or p

  • Article 29 :-Required arguments

    Categories: Python ||

    Required arguments are the arguments passed to a function in correct positional order. Here, the number of arguments in the function call should match exactly with the function definition.To call the

  • Article 30 :-Function Arguments

    Categories: Python ||

    You can call a function by using the following types of formal arguments −Required argumentsKeyword argumentsDefault argumentsVariable-length arguments

  • Article 31 :-Pass by reference vs value

    Categories: PHP ||

    All parameters (arguments) in the Python language are passed by reference. It means if you change what a parameter refers to within a function, the change also reflects back in the calling function. F

  • Article 32 :-Calling a Function

    Categories: Python ||

    Defining a function only gives it a name, specifies the parameters that are to be included in the function and structures the blocks of code.Once the basic structure of a function is finalized, you ca

  • Article 33 :-Example of Python

    Categories: Python ||

    def printme( str ):   "This prints a passed string into this function"   print str   return

  • Article 34 :-Syntax in Python

    Categories: Python ||

    def functionname( parameters ):"function_docstring"function_suitereturn [expression]

  • Article 35 :-Defining a Function

    Categories: Python ||

    You can define functions to provide the required functionality. Here are simple rules to define a function in Python.Function blocks begin with the keyword def followed by the function name and parent

  • Article 36 :-Functions in Python

    Categories: Python ||

    A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.As you al

  • Article 37 :-Single Statement In Python

    Categories: Python ||

    If the suite of an if clause consists only of a single line, it may go on the same line as the header statement.Here is an example of a one-line if clause −Program of Single Statement in python#!/us

  • Article 38 :-Python - Decision Making

    Categories: Python ||

    Decision making is anticipation of conditions occurring while execution of the program and specifying actions taken according to the conditions. Decision structures evaluate multiple expressions which

  • Article 39 :-Highest Precedence in Python Operators

    Categories: Python ||

    The following table lists all operators from highest precedence to lowest.Operator & Description1. ** - Exponentiation (raise to the power)2. ~ + - - Complement, unary plus and minus (method

  • Article 40 :-Python Identity Operators

    Categories: Python ||

    Identity operators compare the memory locations of two objects. There are two Identity operators explained below −OperatorDescriptionExampleisEvaluates to true if the variables on either side of the

  • Article 41 :-Python Membership Operators

    Categories: Python ||

    Python’s membership operators test for membership in a sequence, such as strings, lists, or tuples. There are two membership operators as explained below −OperatorDescriptionExampleinEvaluates to

  • Article 42 :-Python Logical Operators

    Categories: Python ||

    There are following logical operators supported by Python language. Assume variable a holds 10 and variable b holds 20 thenOperatorDescriptionExampleand Logical ANDIf both the operands are true then c

  • Article 43 :-Python Bitwise Operators

    Categories: Python ||

    Bitwise operator works on bits and performs bit by bit operation. Assume if a = 60; and b = 13; Now in the binary format their values will be 0011 1100 and 0000 1101 respectively. Following table list

  • Article 44 :-Python Assignment Operators

    Categories: Python ||

    Assume variable a holds 10 and variable b holds 20, then −Operators - Description - Example= Assigns values from right side operands to left side operandc = a + b assigns value of a + b into c+= Add

  • Article 45 :-Python Comparison Operators

    Categories: Python ||

    These operators compare the values on either sides of them and decide the relation among them. They are also called Relational operators.Assume variable a holds 10 and variable b holds 20, then −Ope

  • Article 46 :-Python Arithmetic Operators

    Categories: Python ||

    Operator - Description -  Example+ Addition -  Adds values on either side of the operator. - a + b = 60- Subtraction - Subtracts right hand operand from left hand operand.-  a –

  • Article 47 :-Different Types of Operators in the Python

    Categories: Python ||

    There are many operators in the Python Language - Arithmetic OperatorsComparison (Relational) OperatorsAssignment OperatorsLogical OperatorsBitwise OperatorsMembership OperatorsIdentity Operators

  • Article 48 :-Announcing data tiering for Amazon ElastiCache for Redis

    Categories: AWS(Amazon Web Services) ||

    Announcing data tiering for Amazon ElastiCache for Redis You can now use data tiering for Amazon ElastiCache for Redis as a lower cost way to scale your clusters to up to hundreds of terabytes of

Top articles
The Impact of Stress on Uterine Problems: Strategies for Management Published at:- Mastering the Art of Resilience: A Guide to Handling Rejection Published at:- Community Colleges Are Navigating the Educational Landscape in 2024 Published at:- Plan Your Dream April Vacation: Top Destinations to Consider Published at:- From Antioxidants to Anti-Inflammatory Compounds: Betel Leaf's Health Secrets Revealed Published at:- Top Smart Glasses of A Buyers Guide Published at:- Key Qualities to Cultivate Becoming a Better Teacher Published at:- Role of Technology in Modern Curriculum Development Published at:- How to Align Curriculum Development with Learning Objectives Published at:- Top 5 Natural Remedies to Shield Your Skin from Holi Colors Published at:- Elevate Your Holi Celebration with this Gujiya Recipe Published at:- Who launched the INSAT 3D satellite and when Published at:- Teaching the Significance of Republic Day to the Next Generation Published at:- Ways to Support the Community on World AIDS Day 2023 of Building Solidarity Published at:- How to Plan the Perfect Winter Wonderland Fest Published at:- Making the Most of Winter Magic Festival Season Published at:- Unleash the Magic: Top Winter Festivals Around the World Published at:- Captivating Moments: Highlights of the Winter Magic Festival Published at:- Embrace the Chill Unforgettable Experiences at the Winter Magic Festival Published at:- Uncovering the Secrets of the Aurora Winter Festival Published at:- 10 Tips for Making the Most of the Winter Festival Published at:- Ultimate Guide to the Aurora Winter Festival Published at:- Ultimate Jack Frost Winterfest Survival Guide Published at:- Complete Guide to Jack Frost Winterfest with Making Memories Published at:- Celebration of Light, Joy, and Togetherness Diwali 2023: Published at:- Experience the Beauty of Diwali 2023 Published at:- Hindu Festival of Lights to Celebrating Diwali 2023 Published at:- Hindu Festival of Lights to Celebrating Diwali 2023 Published at:- Embrace the Festive Vibes Of Diwali 2023 in India Published at:- Achieve Radiant Skin with These Benefits The Power of Skin Toner Published at:- Unveiling the Beauty Benefits of Besan for Your Skin from Dull to Radiant Published at:- Get Glowing with Besan Guide to its Face Transforming Benefits Published at:- Remarkable Benefits of Olive Oil for Skin Whitening Published at:- Unleashing the Power of Platform as a Service in Cloud Computing Published at:- Benefits of Platform as a Service for Cloud Computing Success Published at:- Mastering Cloud Infrastructure Services A Comprehensive Guide Published at:- Choosing the Right Cloud Infrastructure Services for Your Business Published at:- Why Cloud Infrastructure Services Are Essential for Business Success Published at:- Unleashing the Power of Cloud Computing Storage Published at:- Advantages of Cloud Computing Storage Published at:- 10 Creative Ideas for Using Adobe Acrobat Published at:- Unlock the Power of Adobe Acrobat: A Comprehensive Guide Published at:- How to Convert PDFs Easily and Quickly Published at:- When Is the Best Time to Use a PDF Converter Published at:- Advantages of Using a PDF Converter Published at:- Exploring the Benefits of an eLearning Platform Published at:- How to Choose the Right E Learning Platform for Your Needs Published at:- Exploring the Benefits of Vocational Training Published at:- Tips for Choosing the Right Vocational Training Program Published at:- The Pros and Cons of Choosing an AR 15 for Your Next Deer Hunting Rifle Published at:- Why a Universal Basic Income Could be Good Economics for Hard Times Published at:- 7 Reasons Why Every Student Should Own a Personal Computer Published at:- 10 Ways Technology is Revolutionizing Healthcare Published at:- Upcoming Technology In Computer Science Published at:- Capture High Quality Photos and Videos with the VIVO Drone Camera Phone Published at:- PHP and its use Published at:- Why is web application security important for any website Published at:- Technology will be replaced by Android in the future Its correct or not Published at:- Some of the advantages of Angular over other frameworks Published at:- Best E commerce website development services Published at:- Mobile App Security Important in App Development Published at:- Advantages and Disadvantages of Tourism Published at:- What is the best cryptography software Published at:- What are some must read books on economics Published at:- When did Covid start in India Published at:- Which mobile phone has the most sales in India Published at:- Which is the best smartphone under Rs. 8,000 in India Published at:- What are the features of the C language Published at:- Who are the world's top 10 best artists of all time Published at:- What is data binding in AngularJS Published at:- How much do professional gamers earn in India Published at:- What is IT technology Published at:- What's the best mind map software Published at:- What are the service management tools on Linux Published at:- What is cloud computing and its advantages Published at:- How do I raise funds in India for my startup business idea Published at:- What businesses can an electronics and telecommunication engineer start Published at:- What precautions are you taking out of fear of the coronavirus Published at:- Is there a treatment for the Coronavirus Published at:- What is the most popular sport in the world Published at:- What is the key to successful sports betting Published at:- How do I crack Indian Railway Recruitment exams Published at:- What are the top most habits for health, beauty, and fitness of girls aged 14 to 21 Published at:- What is the single best site for homemade health and beauty recipes Published at:- Best Acca Insurance Offers 2022 Published at:- Is Technology Making Leadership More Efficient or Dependent? Published at:- The Value of an International Degree in Business Management Published at:- 5 Startup Lessons They Don't Teach You in College Published at:- Dire Need For A Change Of Syllabus For - 'The Indian Education System' Published at:- Top 10 Reasons Behind the Rise of Aerospace Engineering Career Published at:- What is Component Management in Software Engineering Published at:- PowerApps Versus Microsoft Access Published at:- 3 Things You Need to Fix in Your Website That We Swear You Don't Even Know Published at:- Essential Feature Of Mobile Web Design Published at:- Augmented Reality (AR) Is a Technology That Takes the World Around You and Adds Virtual Content Published at:- How Does A Detailed Discovery Phase Before Custom Software Development Benefits You? Published at:- Custom Software Development Services: A Leap To The Future Published at:- 5 Things You Need to Know About Google+ Published at:- How to Earn From Being a Professional Inviter Published at:- The Social Network Revolution Published at:-
R4RIn Team
The content on R4RIn.com website is created by expert teams.