Introduction to Python

Want to go deeper? Master this in our full course: Next Steps Create your c
Enrol Now

<p><strong>Python</strong> is a widely used general-purpose, high-level programming language. It was initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was mainly developed for emphasis on code readability, and its syntax allows programmers to express concepts in fewer lines of code.</p>


<h2>Why Learn Python?</h2>

<ul>

    <li>It has a simple syntax similar to the English language.</li>

    <li>It operates on an interpreter system, meaning code can be executed as soon as it is written.</li>

    <li>It can be treated in a procedural way, an object-oriented way, or a functional way.</li>

</ul>


<h2>Your First Python Program</h2>

<p>Let's write the classic "Hello World" program in Python. Unlike Java or C++, Python does not require you to write complex class structures just to print a simple message.</p>


<div class="gfg-io-box">

    <i># Python Code:</i><br>

    print("Hello, World!")<br><br>

    <i># Output:</i><br>

    <span style="color: #4ade80;">Hello, World!</span>

</div>


<h2>Basic Python Variables</h2>

<p>Variables are containers for storing data values. In Python, a variable is created the moment you first assign a value to it.</p>


<div class="gfg-io-box">

    <i># Example:</i><br>

    x = 5<br>

    y = "BlitzPrompt"<br>

    print(x)<br>

    print(y)<br><br>

    <i># Output:</i><br>

    <span style="color: #4ade80;">5<br>BlitzPrompt</span>

</div>