Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update learning.rst,,,,, Add simple Python example to beginner learni…
…ng section

Added a short Python code example to help beginners quickly see what Python code looks like before exploring external resources.
  • Loading branch information
parasROR authored Dec 26, 2025
commit 1b838f3e1aacc95c3f59c04ad259d19f48f8b04f
14 changes: 14 additions & 0 deletions docs/intro/learning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,20 @@ how to use Python to create progressively more elaborate 3D structures,
making the process of learning Python fun and engaging.

`Code the blocks <https://codetheblocks.com/tutorials/introduction>`_
Simple Python Example
---------------------

The following example demonstrates a simple and readable Python function
using type hints. This gives beginners a quick look at what real Python code
looks like before exploring external learning resources.

.. code-block:: python

def greet(name: str) -> str:
return f"Hello, {name}"

This example improves clarity for new learners by showing clean syntax and
basic function structure.


************
Expand Down