Operations with STRINGS you should know in PYTHON + examples

Publicado el: 09 marzo 2023
en el canal de: Python Now
37
0

In this video, we will be covering basic operations with strings in Python, such as creation, concatenation, and formatting. In the next video, we will cover string methods and their slicing. We will begin by explaining how to create a string and different types of quotes to use. Then, we will dive into string concatenation and the built-in len() function. Finally, we will discuss string formatting and provide examples of how to use f-strings and older formatting methods. So, if you're ready, let's get started!

Basic data types in Python:
   • Basic DATA TYPES in Python + examples   - watch this!

Task 1:

Create a string that uses single quotes to enclose a sentence that contains a contraction.

Expected outcome: 'I can't believe it!'

Task 2:

Create a string that uses double quotes to enclose a sentence that contains a quote.

Expected outcome: "She said, 'Hello, world!'"

Task 3:

Create a string that uses single quotes to enclose a sentence that contains both a contraction and a quote.

Expected outcome: 'He said, "I can't believe it!"'

Task 4:
Create two string variables, one containing your first name and the other containing your last name. Concatenate the two strings and add a space in between.

Expected outcome:
The concatenated string should contain your full name.

#python #programming #strings


En esta página del sitio puede ver el video en línea Operations with STRINGS you should know in PYTHON + examples de Duración hora minuto segunda en buena calidad , que subió el usuario Python Now 09 marzo 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 37 veces y le gustó 0 a los espectadores. Disfruta viendo!