Conteúdo do Curso
Python Functions Tutorial
Python Functions Tutorial
Single Return Value
A single return value of a function in Python refers to the practice of returning a single object or value from a function. We have already used this type of return value in previous sections. Let's refresh our knowledge and solve a task.
Note
The
join()
function in Python is used to join the elements of an iterable, such as a list, into a single string. Learn more about the join function here.
Tarefa
Your task is to create a function that merges strings in different lists and returns the resulting string as an output.
- You have to use arbitrary arguments because we don't know the number of lists to merge.
- Iterate all lists to merge the strings inside the function body.
- Return the resulting string using
return
keyword.
Obrigado pelo seu feedback!
Single Return Value
A single return value of a function in Python refers to the practice of returning a single object or value from a function. We have already used this type of return value in previous sections. Let's refresh our knowledge and solve a task.
Note
The
join()
function in Python is used to join the elements of an iterable, such as a list, into a single string. Learn more about the join function here.
Tarefa
Your task is to create a function that merges strings in different lists and returns the resulting string as an output.
- You have to use arbitrary arguments because we don't know the number of lists to merge.
- Iterate all lists to merge the strings inside the function body.
- Return the resulting string using
return
keyword.
Obrigado pelo seu feedback!
Single Return Value
A single return value of a function in Python refers to the practice of returning a single object or value from a function. We have already used this type of return value in previous sections. Let's refresh our knowledge and solve a task.
Note
The
join()
function in Python is used to join the elements of an iterable, such as a list, into a single string. Learn more about the join function here.
Tarefa
Your task is to create a function that merges strings in different lists and returns the resulting string as an output.
- You have to use arbitrary arguments because we don't know the number of lists to merge.
- Iterate all lists to merge the strings inside the function body.
- Return the resulting string using
return
keyword.
Obrigado pelo seu feedback!
A single return value of a function in Python refers to the practice of returning a single object or value from a function. We have already used this type of return value in previous sections. Let's refresh our knowledge and solve a task.
Note
The
join()
function in Python is used to join the elements of an iterable, such as a list, into a single string. Learn more about the join function here.
Tarefa
Your task is to create a function that merges strings in different lists and returns the resulting string as an output.
- You have to use arbitrary arguments because we don't know the number of lists to merge.
- Iterate all lists to merge the strings inside the function body.
- Return the resulting string using
return
keyword.