Dictionaries in Python

What is Dictionary in python?
  • Dictionary is an unordered collection of data in the form of key-value pair.
  • The first element in the key-value pair is the key and the second element is the value.
  • Like list, dictionaries are mutable.
Creating a dictionary
  • Dictionaries are written inside curly brackets ({}) with comma-separated key-value pairs.

Tuples in Python

1) What is Tuple?
  • Just like List, Tuple is a collection of ordered elements. But the difference between list and Tuple is, tuples are immutable i.e. the elements in the Tuple cannot be changed, once it is assigned.
  • Tuples also can store both homogeneous and heterogeneous elements.
2) Creating a Tuple
  • Tuples can be created by placing all the elements separated by commas inside parentheses().

Sets in python

What is Set?
  • Set is an unordered collection data type with no duplicate elements. (unique elements)
  • Using curly braces {} or keyword set, we can create a set in Python.
  • In general, the set function is used to eliminate duplicate elements in a list.

Python Comments

  • Comments are the lines that are used to make your code more readable.
  • Comment lines are mainly used for documentation purposes to make the readers understand the source code.
  • These are the lines skipped during the program's execution by the compilers and the interpreters.
  • Sometimes, comments can also serve to prevent the execution of a line when testing code.
  • There are three types of comments in python.
    • Single line comments 
    • Multi-line comments
    • Docstring comments

ISRO 2020 Scientist/Engineer 'SC' Electrical BE005 Question paper with Answer marked

ISRO 2020 Electrical BE005:

ISRO Centralised Recruitment Board

Recruitment for Scientist/Engineer 'SC'

Electrical - BE 005

Held on: January 12, 2020

How to get free AS400 profile and windows client access - PUB400 Registration

Get your free AS400 profile

This post will show you how to get a free AS400 profile by registering in PUB400.com and IBMi Access for windows.

We will see step by step.

Step 1:
  • Go to PUB400.com. This PUB400 domain offers you a free AS400 profile and 300MB of disk storage in the IBM server and two private libraries.
  • Click on "Signup now" to register.

What is the use of PGM and ENDPGM in CL program

PGM and ENDPGM in CL program:
 
In this blog post, we will see what is the use of PGM and ENDPGM commands in a CL program. First, we will start with the PGM command.
 
PGM Command:
  • In general, the PGM command is written to identify the beginning of a CL program.
  • Example:
PGM Command

You might also like

Deploy your Django web app to Azure Web App using App Service - F1 free plan

In this post, we will look at how we can deploy our Django app using the Microsoft Azure app service - a free plan. You need an Azure accoun...