0% found this document useful (0 votes)
4 views1 page

Basic Python

This document is a quick reference guide for beginners in Python, highlighting core concepts such as indentation, variable declaration, and the use of functions. It includes tiny examples of print statements, loops, and conditions, as well as good coding habits and common built-in types. The guide encourages breaking down problems and provides a tip to save it for practice.

Uploaded by

fancytray2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Basic Python

This document is a quick reference guide for beginners in Python, highlighting core concepts such as indentation, variable declaration, and the use of functions. It includes tiny examples of print statements, loops, and conditions, as well as good coding habits and common built-in types. The guide encourages breaking down problems and provides a tip to save it for practice.

Uploaded by

fancytray2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Basics Quick Reference

A compact beginner-friendly documentation sheet for common Python ideas.

Core ideas
Python uses indentation to define blocks. Keep code readable and consistent.
Variables do not need explicit type declarations in most cases.
Use functions to group repeated logic into reusable pieces.

Tiny examples
Print: print('Hello, world!')

Loop: for i in range(5):

print(i)

Condition: if score >= 50: print('Pass')

Good habits
Use meaningful names, add comments only when needed, and test small parts often.
Break big problems into small steps. That makes debugging much easier.

Common built-in types


Type Example Typical use

int 42 Counting and numbers(integers only)

str 'book' Text([“…”] & [‘….’] Both are acceptable)

list [1, 2, 3] Ordered collection

dict {'a': 1} Key-value data


Tip: save this as a reference while practicing small Python programs.

You might also like