BeginnerPython FundamentalsPython
Python Basics – Strings Utility¶
Overview¶
This beginner-friendly utility introduces Python string fundamentals through hands-on examples. It is perfect for newcomers following the learning path in Documentation/Programs/level1_fundamentals.py and looking for extra practice manipulating text data.
What You'll Learn¶
- Creating and concatenating strings
- Formatting strings with f-strings and
str.format() - Common string methods (
upper,lower,split,join, etc.) - Basic validation and cleaning workflows used in data preparation
Files¶
strings_tutorial.py: Walkthrough script with guided printouts and function examples
How to Run¶
Keep the file open in your editor while it runs so you can see how each code section aligns with the console output.Practice Ideas¶
- Build a function that formats user input into title case
- Parse comma-separated text into a cleaned list of tickers
- Use
startswith/endswithto validate filenames before saving data
Next Steps¶
- Explore list operations in
UTILS - Data Structures - Lists/ - Continue through the Level 1 program in
Documentation/Programs/level1_fundamentals.py
Continue in Python Fundamentals¶
-
Python Basics - Comprehensions
Comprehensions are Python's most elegant way to transform data—replacing loops with readable, performant one-liners. This module teaches list, dict, set comprehensions, generator expressions, and functional tools (
map,filter,reduce,accumulate) used constantly in quantitative finance for data cleaning, signal generation, and portfolio calculations. -
Control flow structures (
if/elif/else,for,while, comprehensions,break,continue) are the foundation of all algorithms. This module teaches how to make decisions, iterate through data, and build the logic patterns used in trading systems, backtests, and risk management tools. -
Python Basics - Dates and Times
Markets run on a calendar, not a clock. Interest accrues over days, options
-
Python Basics - Essential Libraries
A working quant leans on a small set of libraries for almost everything. A few of
-
This utility teaches Python functions - the building blocks of modular, reusable code. Learn to write efficient trading algorithms and financial tools using proper function design.
-
Python Basics - Imports and Modules
Almost every Python program begins with a few import lines. An import is how you