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
Nesta página do site você pode assistir ao vídeo on-line Operations with STRINGS you should know in PYTHON + examples duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Python Now 09 Março 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 37 vezes e gostou 0 espectadores. Boa visualização!