Python Strings and Functions Reference: Methods & Examples

Python String Cheat Sheet

===========================
Python String Cheat Sheet
===========================

Strings are

  • Indexed
  • Iterable
  • Immutable

Indexing & Slicing

———————————–

s = "python"

s[0]      -> 'p'
s[-1]     -> 'n'

Slicing:
s[start:end]       -> s[1:4] = 'yth'
s[:3]               -> 'pyt'
s[3:]               -> 'hon'
s[::2]              -> 'pto'
s[::-1]             -> reversed string

Important String Methods

———————————–

Case

  • s.
Read More

Management Fundamentals: Theories, Skills, and Processes

Management: Art, Science, Roles, and Skills

Management is both an art and a science. As a science, management involves applying theoretical frameworks, principles, and techniques to manage organizations. As an art, management requires creativity, intuition, and experience to make decisions and lead people.

Managerial Roles (Mintzberg’s Classification)

  1. Interpersonal Roles:
    • Figurehead: Representing the organization.
    • Leader: Motivating and directing employees.
    • Liaison: Building and maintaining relationships.
Read More

Strategic Management Frameworks and Core Concepts

Module 1: Strategy and Business Models

ConceptKey DefinitionLevels & Frameworks
StrategyThe long-term direction of an organization to achieve Competitive Advantage (doing things differently).3 Levels: 1. Corporate (Scope). 2. Business (How to compete). 3. Functional (Execution).
Strategy StatementVision (The Future), Values (Core principles that do not change), Objectives (Specific targets).3 Steps: Understand to Decide to Execute.
Business ModelExplains how a firm creates, delivers, and captures
Read More

Geological Structures and Rock Classifications

Folds: Bending of Rock Layers

Folds are wave-like undulations in rock strata. They are most common in sedimentary rocks.

Origin and Mechanism of Folds

Folds originate primarily due to Compressional Stress. When rocks are pushed together, they shorten and thicken.

  • Ductile Deformation: Folds form deep within the crust where high temperature and pressure allow rocks to bend without breaking.

  • Tectonic Forces: Major fold belts (like the Himalayas) originate from the collision of tectonic plates.

Classification

Read More

Social Inequality and Intercultural Teaching Methods in Primary Education

Comparative Education Systems and Social Inequality

Education systems reflect cultural ideas about who should have access to education and why. The historical development of education in Spain, the UK, and the USA shows different views regarding access, poverty, social responsibility, and inclusion versus exclusion.

Inequality in the UK Education System

In the UK, education was first mainly for the upper classes. Grammar and public schools prepared wealthy children for leadership, while working-class

Read More

Engineering Materials: Properties and Heat Treatment

Ferrous and Non-Ferrous Materials Comparison

No.Ferrous MaterialsNon-Ferrous Materials
1.Contain iron as the main constituentDo not contain iron
2.Magnetic in nature (most ferrous metals)Non-magnetic
3.High tensile strengthGenerally lower tensile strength (except some alloys)
4.More prone to rust and corrosionHigh resistance to corrosion
5.Usually heavierUsually lighter in weight
6.Less expensiveMore expensive
7.High melting pointLower melting point
8.Good for structural applicationsGood for electrical and
Read More

Mastering English: Listening, Writing, and Reading Drills

Part B: English Language Skills Practice

Listening Comprehension: A Story About Senegal

Listen to Liam telling a story about travelling in Senegal. Number the events (A–F) in the order you hear them.

Exercise 1: Ordering Events

  1. (B) Liam went to university.
  2. (E) Liam and Mark decided to go travelling.
  3. (A) Liam and Mark flew with a pilot.
  4. (F) Mark needed to see a doctor.
  5. (C) Liam and Mark couldn’t fly home.
  6. (D) Liam and Mark got help from their families.

Exercise 2: Complete the Notes

Listen again. Complete

Read More

Software Engineering Processes and Requirements Modeling

Generic Software Framework and Process Flows

A generic software framework consists of five core framework activities: communication, planning, modeling, construction, and deployment. These are supported by umbrella activities, including project tracking and controlling, risk management, quality assurance, and technical reviews.

The process flow describes how these activities are organized. Common flows include:

  • Linear flow: Sequential execution of activities.
  • Iterative process flow: Repeating activities
Read More

EU Transformation: Financial Crises, Brexit, and Policy Responses

Major Crises and Policy Shifts in the European Union

The Great Financial Crisis of 2008

The Great Financial Crisis of 2008 exposed deep structural flaws in the European and global financial systems. These flaws were rooted in decades of financial deregulation, excessive risk-taking, and weak supervision. Within the Eurozone, the combination of full capital mobility, centralized monetary policy under the ECB, and nationally regulated banking systems created major imbalances, resulting in capital flowing

Read More

Neolithic Revolution and Irrigation: Foundations of Agriculture

The Neolithic Revolution: Agricultural Transformation

The Agricultural Revolution, also known as the Neolithic Revolution, marks the major transformation when early humans shifted from a nomadic, hunting–gathering life to settled agriculture. This process began around 10,000 BCE in different parts of the world and became the foundation of human civilization.

1. Introduction

Before agriculture, humans lived in small groups, depending on wild animals and forest produce. With climatic changes after

Read More