Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Python Database
  • Python MySQL
  • Python SQLite
  • Python MongoDB
  • PostgreSQL
  • SQLAlchemy
  • Django
  • Flask
  • SQL
  • ReactJS
  • Vue.js
  • AngularJS
  • API
  • REST API
  • Express.js
  • NodeJS
Open In App
Next Article:
How to install MySQL Connector Package in Python
Next article icon

Python MySQL

Last Updated : 25 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Python MySQL Connector is a Python driver that helps to integrate Python and MySQL. This Python MySQL library allows the conversion between Python and MySQL data types. MySQL Connector API is implemented using pure Python and does not require any third-party library. 

python mysql tutorial

This Python MySQL tutorial will help to learn how to use MySQL with Python from basics to advance, including all necessary functions and queries explained in detail with the help of good Python MySQL examples. So, let’s get started.

Installation

To install the Python-mysql-connector module, one must have Python and PIP, preinstalled on their system. If Python and pip are already installed type the below command in the terminal.

pip3 install mysql-connector-python

Note: If Python is not present, go through How to install Python on Windows and Linux? and follow the instructions provided.

python mysql connector install

Connecting to MySQL Server

We can connect to the MySQL server using the connect() method. 

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password"
)
 
print(dataBase)
  
# Disconnecting from the server
dataBase.close()
                      
                       

Output:

<mysql.connector.connection_cext.CMySQLConnection object at 0x7f73f0191d00>

Note: For more information, refer to Connect MySQL database using MySQL-Connector Python.

Creating Database

After connecting to the MySQL server let’s see how to create a MySQL database using Python. For this, we will first create a cursor() object and will then pass the SQL command as a string to the execute() method. The SQL command to create a database is – 

CREATE DATABASE DATABASE_NAME

Example: Creating MySQL database with Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
 
# creating database
cursorObject.execute("CREATE DATABASE gfg")
                      
                       

Output:

Pyhton mysql create database

Creating Tables

For creating tables we will follow the similar approach of writing the SQL commands as strings and then passing it to the execute() method of the cursor object. SQL command for creating a table is – 

CREATE TABLE (     column_name_1 column_Data_type,     column_name_2 column_Data_type,     :     :     column_name_n column_Data_type );

Example: Creating MySQL table using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
# creating table
studentRecord = """CREATE TABLE STUDENT (
                   NAME  VARCHAR(20) NOT NULL,
                   BRANCH VARCHAR(50),
                   ROLL INT NOT NULL,
                   SECTION VARCHAR(5),
                   AGE INT
                   )"""
  
# table created
cursorObject.execute(studentRecord)
  
# disconnecting from server
dataBase.close()
                      
                       

Output:

create table python mysql

Insert Data into Tables

To insert data into the MySQL table Insert into query is used. 

Syntax:

 INSERT INTO table_name (column_names) VALUES (data)

Example 1: Inserting Single Row

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
sql = "INSERT INTO STUDENT (NAME, BRANCH, ROLL, SECTION, AGE)\
VALUES (%s, %s, %s, %s, %s)"
val = ("Ram", "CSE", "85", "B", "19")
   
cursorObject.execute(sql, val)
dataBase.commit()
   
# disconnecting from server
dataBase.close()
                      
                       

Output:

insert 1 row in mysql database using Python

Example 2: Inserting Multiple Rows

To insert multiple values at once, executemany() method is used. This method iterates through the sequence of parameters, passing the current parameter to the execute method.

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
sql = "INSERT INTO STUDENT (NAME, BRANCH, ROLL, SECTION, AGE)\
VALUES (%s, %s, %s, %s, %s)"
val = [("Nikhil", "CSE", "98", "A", "18"),
       ("Nisha", "CSE", "99", "A", "18"),
       ("Rohan", "MAE", "43", "B", "20"),
       ("Amit", "ECE", "24", "A", "21"),
       ("Anil", "MAE", "45", "B", "20"),
       ("Megha", "ECE", "55", "A", "22"),
       ("Sita", "CSE", "95", "A", "19")]
   
cursorObject.executemany(sql, val)
dataBase.commit()
   
# disconnecting from server
dataBase.close()
                      
                       

Output:

python mysql insert many rows

Fetching Data

We can use the select query on the MySQL tables in the following ways –

  • In order to select particular attribute columns from a table, we write the attribute names.
SELECT attr1, attr2 FROM table_name
  • In order to select all the attribute columns from a table, we use the asterisk ‘*’ symbol.
SELECT * FROM table_name

Example: Select data from MySQL table using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query = "SELECT NAME, ROLL FROM STUDENT"
cursorObject.execute(query)
   
myresult = cursorObject.fetchall()
   
for x in myresult:
    print(x)
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

python mysql select query

Where Clause

Where clause is used in MySQL database to filter the data as per the condition required. You can fetch, delete or update a particular set of data in MySQL database by using where clause.

Syntax:

SELECT column1, column2, …. columnN FROM [TABLE NAME] WHERE [CONDITION];

Example: Where clause in MySQL using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query = "SELECT * FROM STUDENT where AGE >=20"
cursorObject.execute(query)
   
myresult = cursorObject.fetchall()
   
for x in myresult:
    print(x)
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

('Rohan', 'MAE', 43, 'B', 20) ('Amit', 'ECE', 24, 'A', 21) ('Anil', 'MAE', 45, 'B', 20) ('Megha', 'ECE', 55, 'A', 22)

Order By Clause

OrderBy is used to arrange the result set in either ascending or descending order. By default, it is always in ascending order unless “DESC” is mentioned, which arranges it in descending order. “ASC” can also be used to explicitly arrange it in ascending order. But, it is generally not done this way since default already does that.

Syntax:

SELECT column1, column2 FROM table_name ORDER BY column_name ASC|DESC;

Example: Order By clause in MySQL using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query = "SELECT * FROM STUDENT ORDER BY NAME DESC"
cursorObject.execute(query)
   
myresult = cursorObject.fetchall()
   
for x in myresult:
    print(x)
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

python mysql ordery by

Limit Clause

The Limit clause is used in SQL to control or limit the number of records in the result set returned from the query generated. By default, SQL gives out the required number of records starting from the top but it allows the use of OFFSET keyword. OFFSET allows you to start from a custom row and get the required number of result rows.

Syntax:

SELECT * FROM tablename LIMIT limit; SELECT * FROM tablename LIMIT limit OFFSET offset;

Example: Limit Clause in MySQL using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query = "SELECT * FROM STUDENT LIMIT 2 OFFSET 1"
cursorObject.execute(query)
   
myresult = cursorObject.fetchall()
   
for x in myresult:
    print(x)
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

('Nikhil', 'CSE', 98, 'A', 18) ('Nisha', 'CSE', 99, 'A', 18)

Update Data

The update query is used to change the existing values in a database. By using update a specific value can be corrected or updated. It only affects the data and not the structure of the table. The basic advantage provided by this command is that it keeps the table accurate.

Syntax:

UPDATE tablename SET ="new value" WHERE ="old value";

Example: Update MySQL table using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query = "UPDATE STUDENT SET AGE = 23 WHERE Name ='Ram'"
cursorObject.execute(query)
dataBase.commit()
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

python mysql update table

Delete Data from Table

We can use the Delete query to delete data from the table in MySQL.

Syntax:

DELETE FROM TABLE_NAME WHERE ATTRIBUTE_NAME = ATTRIBUTE_VALUE

Example: Delete Data from MySQL table using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query = "DELETE FROM STUDENT WHERE NAME = 'Ram'"
cursorObject.execute(query)
dataBase.commit()
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

python mySQL delete from table

Drop Tables

Drop command affects the structure of the table and not data. It is used to delete an already existing table. For cases where you are not sure if the table to be dropped exists or not DROP TABLE IF EXISTS command is used. Both cases will be dealt with in the following examples.

Syntax:

DROP TABLE tablename; DROP TABLE IF EXISTS tablename;

At first, let’s see the list of tables in our database.

python mysql drop tables

We can see that there are two tables for students, so let’s drop the second table.

Example 1: Drop Table in MySQL using Python

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query ="DROP TABLE Student;"
 
cursorObject.execute(query)
dataBase.commit()
 
# disconnecting from server
dataBase.close()
                      
                       

Output:

python mysql drop tables

Example 2: Drop Table if exists

Python3

# importing required libraries
import mysql.connector
  
dataBase = mysql.connector.connect(
  host ="localhost",
  user ="user",
  passwd ="password",
  database = "gfg"
)
 
# preparing a cursor object
cursorObject = dataBase.cursor()
  
query ="Drop Table if exists Employee;"
 
cursorObject.execute(query)
dataBase.commit()
 
# disconnecting from server
dataBase.close()
                      
                       

The above example, will not create any error and output because we have used the Drop Table is exists query. If we will simply use the Drop table Employee then ProgrammingError: 1051 (42S02): Unknown table ‘gfg.Employee’ is raised.

Python MySQL Exercises

Working With Tables

  • How to insert values into MySQL server table using Python?
  • How to Show All Tables in MySQL using Python?
  • How to Get the Size of a Table in MySQL using Python?
  • How to Rename a MySQL Table in Python?
  • How to Copy a Table in MySQL Using Python?
  • How to Copy a Table Definition in MySQL Using Python?
  • Get the id after INSERT into MySQL database using Python
  • How to Use IF Statement in MySQL Using Python
  • Deleting Element from Table in MySql using Python
  • Grant MySQL table and column permissions using Python

Working on Columns

  • How to Count the Number of Rows in a MySQL Table in Python?
  • Count SQL Table Column Using Python
  • How to Add a Column to a MySQL Table in Python?
  • How to Get the Minimum and maximum Value of a Column of a MySQL Table Using Python?
  • How to Perform Arithmetic Across Columns of a MySQL Table Using Python?
  • How to Concatenate Column Values of a MySQL Table Using Python?
  • Add comment to column in MySQL using Python
  • Grant MySQL table and column permissions using Python

Python MySQL Applications and Projects

  • Create MySQL Database Login Page in Python using Tkinter
  • Extract Data from Database using MySQL-Connector and XAMPP in Python


Next Article
How to install MySQL Connector Package in Python
author
abhishek1
Improve
Article Tags :
  • Python
  • Python-mySQL
Practice Tags :
  • python

Similar Reads

  • Python MySQL
    Python MySQL Connector is a Python driver that helps to integrate Python and MySQL. This Python MySQL library allows the conversion between Python and MySQL data types. MySQL Connector API is implemented using pure Python and does not require any third-party library.  This Python MySQL tutorial will
    9 min read
  • How to install MySQL Connector Package in Python
    MySQL is a Relational Database Management System (RDBMS) whereas the structured Query Language (SQL) is the language used for handling the RDBMS using commands i.e Creating, Inserting, Updating and Deleting the data from the databases. A connector is employed when we have to use MySQL with other pro
    2 min read
  • Connect MySQL database using MySQL-Connector Python
    While working with Python we need to work with databases, they may be of different types like MySQL, SQLite, NoSQL, etc. In this article, we will be looking forward to how to connect MySQL databases using MySQL Connector/Python.MySQL Connector module of Python is used to connect MySQL databases with
    3 min read
  • How to Install MySQLdb module for Python in Linux?
    In this article, we are discussing how to connect to the MySQL database module for python in Linux. MySQLdb is an interface for connecting to a MySQL database server from Python. It implements the Python Database API v2.0 and is built on top of the MySQL C API. Installing MySQLdb module for Python o
    2 min read
  • MySQL Queries

    • Python MySQL - Select Query
      Python Database API ( Application Program Interface ) is the Database interface for the standard Python. This standard is adhered to by most Python Database interfaces. There are various Database servers supported by Python Database such as MySQL, GadFly, mySQL, PostgreSQL, Microsoft SQL Server 2000
      2 min read

    • CRUD Operation in Python using MySQL
      In this article, we will be seeing how to perform CRUD (CREATE, READ, UPDATE and DELETE) operations in Python using MySQL. For this, we will be using the Python MySQL connector. For MySQL, we have used Visual Studio Code for python. Before beginning we need to install the MySQL connector with the co
      6 min read

    • Python MySQL - Create Database
      Python Database API ( Application Program Interface ) is the Database interface for the standard Python. This standard is adhered to by most Python Database interfaces. There are various Database servers supported by Python Database such as MySQL, GadFly, mSQL, PostgreSQL, Microsoft SQL Server 2000,
      2 min read

    • Python MySQL - Update Query
      A connector is employed when we have to use MySQL with other programming languages. The work of MySQL-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server. Update Clause The update is used to ch
      2 min read

    • Python MySQL - Insert into Table
      MySQL is a Relational Database Management System (RDBMS) whereas the structured Query Language (SQL) is the language used for handling the RDBMS using commands i.e Creating, Inserting, Updating and Deleting the data from the databases. SQL commands are case insensitive i.e CREATE and create signify
      3 min read

    • Python MySQL - Insert record if not exists in table
      In this article, we will try to insert records and check if they EXISTS or not. The EXISTS condition in SQL is used to check if the result of a correlated nested query is empty (contains no tuples) or not. It can be used to INSERT, SELECT, UPDATE, or DELETE statements. Pre-requisite Connect MySQL Da
      4 min read

    • Python MySQL - Delete Query
      Python Database API ( Application Program Interface ) is the Database interface for the standard Python. This standard is adhered to by most Python Database interfaces. There are various Database servers supported by Python Databases such as MySQL, GadFly, PostgreSQL, Microsoft SQL Server 2000, Info
      3 min read

    MySQL Clause

    • Python MySQL - Where Clause
      Where clause is used in MySQL database to filter the data as per the condition required. You can fetch, delete or update a particular set of data in MySQL database by using where clause.Syntax  SELECT column1, column2, .... columnN FROM [TABLE NAME] WHERE [CONDITION];   The above syntax is used for
      2 min read

    • Python MySQL - Order By Clause
      A connector is employed when we have to use MySQL with other programming languages. The work of MySQL-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server. OrderBy Clause OrderBy is used to arra
      2 min read

    • Python MySQL - Limit Clause
      A connector is employed when we have to use MySQL with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and MySQL Server. Python-MySQL-Connector This is a MySQL Con
      2 min read

    • Python MySQL - Join
      A connector is employed when we have to use mysql with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server. Python-MySQL-Connector This is a MySQL
      2 min read

    MySQL Working with Data

    • MySQL | Regular Expressions (Regexp)
      In MySQL, regular expressions (REGEX) offer powerful functionality for flexible pattern matching within string data. By using the REGEXP and RLIKE operators, developers can efficiently search, validate, and manipulate string data in more dynamic ways than simple LIKE queries. In this article, we wil
      7 min read

    • SQL Query to Match Any Part of String
      It is used for searching a string or a sub-string to find a certain character or group of characters from a string. We can use the LIKE Operator of SQL to search sub-strings. The LIKE operator is used with the WHERE Clause to search a pattern in a string of columns. The LIKE operator is used in conj
      3 min read

    • SQL Auto Increment
      In SQL databases, a primary key is important for uniquely identifying records in a table. However, sometimes it is not practical to manually assign unique values for each record, especially when handling large datasets. To simplify this process, SQL databases offer an Auto Increment feature that aut
      6 min read

    • SQL Query to Delete Duplicate Rows
      Duplicate rows in a database can cause inaccurate results, waste storage space, and slow down queries. Cleaning duplicate records from our database is an essential maintenance task for ensuring data accuracy and performance. Duplicate rows in a SQL table can lead to data inconsistencies and performa
      6 min read

    • SQL Query to Convert an Integer to Year Month and Days
      With this article, we will be knowing how to convert an integer to Year, Month, Days from an integer value. The prerequisites of this article are you should be having a MSSQL server on your computer. What is a query? A query is a statement or a group of statements written to perform a specific task,
      2 min read

    • Calculate the Number of Months between two specific dates in SQL
      In this article, we will discuss the overview of SQL Query to Calculate the Number of Months between two specific dates and will implement with the help of an example for better understanding. Let's discuss it step by step. Overview :Here we will see, how to calculate the number of months between th
      3 min read

    • How to Compare Two Queries in SQL
      Queries in SQL :A query will either be an invitation for data results from your info or for action on the info, or each. a question will provide you with a solution to a straightforward question, perform calculations, mix data from totally different tables, add, change, or delete data from info. Cre
      2 min read

    • Joining 4 Tables in SQL
      The purpose of this article is to make a simple program to Join two tables using Join and Where clause in SQL. Below is the implementation for the same using MySQL. The prerequisites of this topic are MySQL and the installment of Apache Server on your computer. Introduction :In SQL, a query is a req
      3 min read

    MySQL Working with Images

    • Working with MySQL BLOB in Python
      In Python Programming, We can connect with several databases like MySQL, Oracle, SQLite, etc., using inbuilt support. We have separate modules for each database. We can use SQL Language as a mediator between the python program and database. We will write all queries in our python program and send th
      4 min read

    • Retrieve Image and File stored as a BLOB from MySQL Table using Python
      Prerequisites: MySQL server should be installed In this post, we will be talking about how we can store files like images, text files, and other file formats into a MySQL table from a python script. Sometimes, just like other information, we need to store images and files into our database and provi
      3 min read

    • How to read image from SQL using Python?
      In this article, we are going to discuss how to read an image or file from SQL using python. For doing the practical implementation, We will use MySQL database.  First, We need to connect our Python Program with MySQL database. For doing this task, we need to follow these below steps: Steps to Conne
      3 min read

  • Boutique Management System using Python-MySQL Connectivity
    In this article, we are going to make a simple project on a boutique management system using Python MySql connectivity. Introduction This is a boutique management system made using MySQL connectivity with Python. It uses a MySQL database to store data in the form of tables and to maintain a proper r
    15+ min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences