Creating a String
Welcome to the course! Strings are one of the data types, representing textual data. As a data scientist, you should be able to work with such data.
Let's start our learning with defining strings. To define a string, put text within the single ('text'
) or double quotation marks ("text"
). Another way - is to use the str
function with an expression you want to represent as a string. Usually, this function is used to convert an existing variable into a string.
Note
There is no difference between using single or double quotation marks. But the text within the string must be surrounded by the same type of quotation marks (i.e. you can not use
"text'
).
Swipe to start coding
Assign string 'String Manipulation in Python' to the variable course
and print its value.
Once you've completed this task, click the button below the code to check your solution.
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 4.35Awesome!
Completion rate improved to 4.35
Creating a String
Welcome to the course! Strings are one of the data types, representing textual data. As a data scientist, you should be able to work with such data.
Let's start our learning with defining strings. To define a string, put text within the single ('text'
) or double quotation marks ("text"
). Another way - is to use the str
function with an expression you want to represent as a string. Usually, this function is used to convert an existing variable into a string.
Note
There is no difference between using single or double quotation marks. But the text within the string must be surrounded by the same type of quotation marks (i.e. you can not use
"text'
).
Swipe to start coding
Assign string 'String Manipulation in Python' to the variable course
and print its value.
Once you've completed this task, click the button below the code to check your solution.
Oplossing
Bedankt voor je feedback!
single
Awesome!
Completion rate improved to 4.35
Creating a String
Veeg om het menu te tonen
Welcome to the course! Strings are one of the data types, representing textual data. As a data scientist, you should be able to work with such data.
Let's start our learning with defining strings. To define a string, put text within the single ('text'
) or double quotation marks ("text"
). Another way - is to use the str
function with an expression you want to represent as a string. Usually, this function is used to convert an existing variable into a string.
Note
There is no difference between using single or double quotation marks. But the text within the string must be surrounded by the same type of quotation marks (i.e. you can not use
"text'
).
Swipe to start coding
Assign string 'String Manipulation in Python' to the variable course
and print its value.
Once you've completed this task, click the button below the code to check your solution.
Oplossing
Bedankt voor je feedback!