19. join()
The join() function lets you merge string items in a list.
You only need to specify a delimiter and the target list to use it:
The join() function lets you merge string items in a list.
You only need to specify a delimiter and the target list to use it:
a = ["Python", "tutorial", "on", "MUO"]Output: Python tutorial on MUO
a = " ".join(a)
print(a)
🔥2👍1
20. replace()
Python's replace() method lets you replace some parts of a string with another character. It's often handy in data science, especially during data cleaning.
The replace() method accepts two parameters: the replaced character and the one you'll like to replace it with.
Here's how it works:
Cart name
First name
Last name
Python's replace() method lets you replace some parts of a string with another character. It's often handy in data science, especially during data cleaning.
The replace() method accepts two parameters: the replaced character and the one you'll like to replace it with.
Here's how it works:
columns = ["Cart_name", "First_name", "Last_name"]Output:
for i in columns:
i = i.replace("_", " ")
print(i)
Cart name
First name
Last name
👍2🔥2
What is the difference between append() and extend() methods?
Both append() and extend() methods are methods used to add elements at the end of a list.
👉append(element): Adds the given element at the end of the list that called this append() method
👉extend(another-list): Adds the elements of another list at the end of the list that called this extend() method
Both append() and extend() methods are methods used to add elements at the end of a list.
👉append(element): Adds the given element at the end of the list that called this append() method
👉extend(another-list): Adds the elements of another list at the end of the list that called this extend() method
❤2👍2🔥1
Python Learning Courses provided by Microsoft 📚
Recently, I found out that Microsoft provides quality online courses related to Python on Microsoft Learn.
Microsoft Learn is a free online platform that provides access to a set of training courses for the acquisition and improvement of digital skills. Each course is designed as a module, each module contains different lessons and exercises. Below are the modules related to Python learning.
🟢Beginner
1. What is Python?
2. Introduction to Python
3. Take your first steps with Python
4. Set up your Python beginner development environment with Visual Studio Code
5. Branch code execution with the if...elif...else statement in Python
6. Manipulate and format string data for display in Python
7. Perform mathematical operations on numeric data in Python
8. Iterate through code blocks by using the while statement
9. Import standard library modules to add features to Python programs
10. Create reusable functionality with functions in Python
11. Manage a sequence of data by using Python lists
12. Write basic Python in Notebooks
13. Count the number of Moon rocks by type using Python
14. Code control statements in Python
15. Introduction to Python for space exploration
16. Install coding tools for Python development
17. Discover the role of Python in space exploration
18. Crack the code and reveal a secret with Python and Visual Studio Code
19. Introduction to object-oriented programming with Python
20. Use Python basics to solve mysteries and find answers
21. Predict meteor showers by using Python and Visual Studio Code
22. Plan a Moon mission by using Python pandas
🟠Intermediate
1. Create machine learning models
2. Explore and analyze data with Python
3. Build an AI web app by using Python and Flask
4. Get started with Django
5. Architect full-stack applications and automate deployments with GitHub
#materials
Recently, I found out that Microsoft provides quality online courses related to Python on Microsoft Learn.
Microsoft Learn is a free online platform that provides access to a set of training courses for the acquisition and improvement of digital skills. Each course is designed as a module, each module contains different lessons and exercises. Below are the modules related to Python learning.
🟢Beginner
1. What is Python?
2. Introduction to Python
3. Take your first steps with Python
4. Set up your Python beginner development environment with Visual Studio Code
5. Branch code execution with the if...elif...else statement in Python
6. Manipulate and format string data for display in Python
7. Perform mathematical operations on numeric data in Python
8. Iterate through code blocks by using the while statement
9. Import standard library modules to add features to Python programs
10. Create reusable functionality with functions in Python
11. Manage a sequence of data by using Python lists
12. Write basic Python in Notebooks
13. Count the number of Moon rocks by type using Python
14. Code control statements in Python
15. Introduction to Python for space exploration
16. Install coding tools for Python development
17. Discover the role of Python in space exploration
18. Crack the code and reveal a secret with Python and Visual Studio Code
19. Introduction to object-oriented programming with Python
20. Use Python basics to solve mysteries and find answers
21. Predict meteor showers by using Python and Visual Studio Code
22. Plan a Moon mission by using Python pandas
🟠Intermediate
1. Create machine learning models
2. Explore and analyze data with Python
3. Build an AI web app by using Python and Flask
4. Get started with Django
5. Architect full-stack applications and automate deployments with GitHub
#materials
👍9🔥5❤1
C2Cpayment is the Crypto C2C trading platform! C2C is coin TO coin! C2C is consumer TO consumer!Click to start
👍1
Learning python by building games [ Packt ] by Sachin Kafle
👇👇
👇👇
Python Basics: A Practical Introduction to Python 3
👇👇
👇👇
👍1
Basic Arithmetic
# Addition
Input :2+1
Output:3
# Subtraction
Input :2-1
Output:1
# Multiplication
Input :2*2
Output:4
# Division
Input :3/2
Output:1.5
# Floor Division
Input :7//4
Output:1
# Addition
Input :2+1
Output:3
# Subtraction
Input :2-1
Output:1
# Multiplication
Input :2*2
Output:4
# Division
Input :3/2
Output:1.5
# Floor Division
Input :7//4
Output:1
❤7👍4
Six Steps to Defining a Function
1. What should your function do? Type a couple of example calls.
2. Pick a meaningful name (often a verb or verb phrase): What is a short answer to "What does
your function do"?
3. Decide how many parameters the function takes and any return values
4. Describe what your function does and any parameters and return values in the docstring
5. Write the body of the function
6. Test your function. Think about edge cases.
1. What should your function do? Type a couple of example calls.
2. Pick a meaningful name (often a verb or verb phrase): What is a short answer to "What does
your function do"?
3. Decide how many parameters the function takes and any return values
4. Describe what your function does and any parameters and return values in the docstring
5. Write the body of the function
6. Test your function. Think about edge cases.
❤6👍1