Skip to content

singhvibhanshu/Python-Codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Codes

This repository contains Python code examples organized into different levels: Beginner, Object-Oriented, Intermediate, and Advanced Python. It's designed to help learners at various stages of Python programming build a strong foundation and tackle more complex topics.

Table of Contents

Folder Structure

The repository is divided into the following sections:

  1. Beginner_Python: Basic Python concepts.
  2. Object_Oriented: Object-oriented programming examples in Python.
  3. Intermediate_Python: Intermediate-level concepts such as data structures and functional programming.
  4. Advanced_Python: Advanced Python topics, including metaclasses and decorators.

Beginner_Python

This folder contains code covering the basics of Python. Each file covers a specific foundational concept:

  • conditions.py: Handling conditions and boolean logic.
  • data_types.py: Understanding Python data types.
  • for_loops.py: Using for loops in Python.
  • functions.py: Defining and using functions.
  • if_elif_else.py: Implementing conditional statements.
  • iteration.py: Exploring iteration concepts in Python.
  • lists.py: Working with lists.
  • modular.py: Demonstrating modular programming.
  • optional_parameter.py: Using optional parameters in functions.
  • other_methods.py: Additional built-in Python methods.
  • read_file.py: Reading files in Python.
  • write_file.py: Writing to files in Python.
  • slice_operator.py: Using slice operator with sequences.
  • string_methods.py: Applying string methods.
  • try_except.py: Exception handling using try and except.
  • while_loops.py: Using while loops.

Object_Oriented

The Object_Oriented folder provides examples related to object-oriented programming in Python:

  • creating_classes.py: Creation of classes in Python.
  • example_public_privateclasses.py: Example of public and private classes.
  • inheritance01.py: Demonstrating basic inheritance.
  • inheritance02.py: Further demonstration of inheritance.
  • intro_to_objects.py: Introduction to objects in Python.
  • public_privateclasses.py: A look at public and private class members.
  • staticclass_methods.py: Understanding static methods and class methods.

Intermediate_Python

This folder contains intermediate Python topics, including functional programming and much more:

  • counter.py: Using Counter from the collections module.
  • deque.py: Working with deque objects.
  • filter_functions.py: Using filter functions in Python.
  • lambda_function.py: Working with lambda expressions.
  • map_function.py: Demonstrating the map function.
  • namedTuple.py: Working with namedtuple from the collections module.
  • optional_parameter.py: Optional parameters in Python functions.
  • static_class_methods.py: Further understanding of static and class methods.

Advanced_Python

The Advanced_Python folder covers more advanced topics, including decorators, metaclasses, and more:

  • context_managers.py: Understanding and using context managers.
  • decorators.py: Implementing and using decorators.
  • dunder_or_magic_methods.py: Understanding special or "dunder" methods in Python.
  • generators.py: Using generators for efficient iteration.
  • metaclasses01.py: Introduction to metaclasses in Python.
  • metaclasses02.py: Further understanding of metaclasses.

Prerequisites

  • Python 3.9+

Run Instructions

  • Download the respective .py file
  • Go to a terminal of your choice and run python filename.py

About

Python codes for the cloud access.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages