Python logoPython posts from the former Claude Explains blog

Table of Contents

  1. Basic Python Operations (16 articles)

  2. String Manipulation (22 articles)

  3. Lists and Arrays (26 articles)

  4. Dictionaries (9 articles)

  5. Sets and Tuples (3 articles)

  6. File Operations (8 articles)

  7. Mathematical Operations (22 articles)

  8. Control Flow (4 articles)

  9. Functions and Variables (6 articles)

  10. Input and Output (3 articles)

  11. Data Type Conversion (4 articles)

  12. Environment and Directory Operations (6 articles)

Basic Python Operations

  1. How to print in Python

  2. How to comment in Python

  3. How to use 'if' in Python

  4. How to use 'elif' in Python

  5. How to use 'and' in Python

  6. How to use 'or' in Python

  7. How to use 'break' in Python

  8. How to use booleans in Python

  9. How to write not equal to in Python

  10. How to end a program in Python

  11. How to sleep in Python

  12. How to loop in Python

  13. How to use a while loop in Python

  14. How to repeat something in Python

  15. How to use range() in Python

  16. How to use enumerate() in Python

String Manipulation

  1. How to convert a string to a list in Python

  2. How to convert a list to a string in Python

  3. How to use upper() in Python

  4. How to lowercase a string in Python

  5. How to capitalize the first letter in Python

  6. How to print the ASCII value in Python

  7. How to find the length of a string in Python

  8. How to concatenate strings in Python

  9. How to append to a string in Python

  10. How to remove spaces from a string in Python

  11. How to remove a character from a string in Python

  12. How to replace a character in a string in Python

  13. How to remove non-alphanumeric characters in Python

  14. How to reverse a string in Python

  15. How to split a string in Python

  16. How to slice a string in Python

  17. How to sort a string in Python

  18. How to use f-strings in Python

  19. How to print a new line in Python

  20. How to skip a line in Python

  21. How to print on the same line in Python

  22. How to use join() in Python

Lists and Arrays

  1. How to make a list in Python

  2. How to initialize a list in Python

  3. How to create an empty list in Python

  4. How to add to a list in Python

  5. How to get the last element of a list in Python

  6. How to find the length of a list in Python

  7. How to find the length of an array in Python

  8. How to remove an item from a list in Python

  9. How to use pop() in Python

  10. How to clear a list in Python

  11. How to print a list in Python

  12. How to print a matrix in Python

  13. How to merge two lists in Python

  14. How to copy a list in Python

  15. How to reverse a list in Python

  16. How to shuffle a list in Python

  17. How to sort a list in Python

  18. How to sort a list alphabetically in Python

  19. How to slice a list in Python

  20. How to split a list in Python

  21. How to sum a list in Python

  22. How to remove duplicates from a list in Python

  23. How to iterate through a list in Python

  24. How to take a list as input in Python

  25. How to create an array in Python

  26. How to initialize an array in Python

Dictionaries

  1. How to create a dictionary in Python

  2. How to initialize a dictionary in Python

  3. How to access a dictionary in Python

  4. How to add a key value pair to a dictionary in Python

  5. How to append to a dictionary in Python

  6. How to print a dictionary in Python

  7. How to loop through a dictionary in Python

  8. How to compare two dictionaries in Python

  9. How to sort a dictionary in Python

Sets and Tuples

  1. How to make a set in Python

  2. How to initialize a set in Python

  3. How to create a tuple in Python

File Operations

  1. How to check if a file exists in Python

  2. How to create a file in Python

  3. How to delete a file in Python

  4. How to open a file in Python

  5. How to read a text file in Python

  6. How to read a CSV file in Python

  7. How to read an Excel file in Python

  8. How to write to a file in Python

Mathematical Operations

  1. How to do math in Python

  2. How to subtract in Python

  3. How to multiply in Python

  4. How to divide in Python

  5. How to use modulo in Python

  6. How to do exponents in Python

  7. How to do square root in Python

  8. How to square a number in Python

  9. How to do absolute value in Python

  10. How to use 'e' in Python

  11. How to use pi in Python

  12. How to increment a variable in Python

  13. How to find the average in Python

  14. How to calculate a percentage in Python

  15. How to find the factorial of a number in Python

  16. How to find prime numbers in Python

  17. How to round down in Python

  18. How to round up in Python

  19. How to round to 2 decimal places in Python

  20. How to limit decimal places in Python

  21. How to reverse a number in Python

  22. How to generate random numbers in Python

Control Flow

  1. How to use lambda in Python

  2. How to use 'return' in Python

  3. How to return multiple values in Python

  4. How to write an algorithm in Python

Functions and Variables

  1. How to create a function in Python

  2. How to create a class in Python

  3. How to define a variable in Python

  4. How to define a global variable in Python

  5. How to print a variable in Python

  6. How to use len() in Python

Input and Output

  1. How to take input in Python

  2. How to take integer input in Python

  3. How to get the current time in Python

Data Type Conversion

  1. How to convert a string to a float in Python

  2. How to convert an int to a string in Python

  3. How to convert a float to an int in Python

  4. How to cast data types in Python

Environment and Directory Operations

  1. How to change the working directory in Python

  2. How to change the directory in Python

  3. How to get the current working directory in Python

  4. How to clear the screen in Python

  5. How to use environment variables in Python

  6. How to create a dataframe in Python

🏠