Small concepts. Hands-on practice. Stronger Python foundations.
A beginner-friendly notebook exploring two essential Python data types through code examples.
This is part of my Python learning journey, focused on understanding how strings and tuples work in Python. The notebook uses practical code exercises to explore text operations, element access, slicing, and combining values.
The goal is simple: learn the fundamentals by writing and running code.
|
|
text = "Python Programming"
print(text.upper())
print(text.lower())
print(text[::-1])
print(text.count("m"))
print(text.replace("Python", "Learning"))first = (1, 2, 3)
second = (4, 5)
print(first + second) # Concatenation
print(first * 2) # Repetition
print(first[0]) # Indexing
print(first[1:]) # Slicing- Understand common string operations and built-in methods.
- Practise indexing and slicing to retrieve specific parts of a sequence.
- Learn how tuples can be combined, repeated, and accessed.
- Build confidence with Python syntax through small exercises.
python · jupyter-notebook · python-basics · strings · tuples · programming-practice · beginner-friendly · learning-python
- Open the
.ipynbnotebook in Jupyter Notebook, JupyterLab, or Google Colab. - Run each cell from top to bottom.
- Modify the examples and experiment with different inputs.
- Observe the output to understand each operation.
Strings help us work with text, while tuples let us store ordered collections of values. Practising their operations builds a useful foundation for more advanced Python programming.
I’m building my Python skills step by step through practical exercises and continuous learning.
Behind every line of code is an opportunity to learn something new.
Thanks for visiting! ⭐ Keep learning, keep coding.