mirror of https://github.com/01-edu/public.git
eslopfer
2 years ago
1 changed files with 29 additions and 0 deletions
@ -0,0 +1,29 @@ |
|||||||
|
## concat_string |
||||||
|
|
||||||
|
### Instructions |
||||||
|
|
||||||
|
Create a file `concat_string.py` that contains a function `concat` which takes in two strings as parameters and performs the following operations: |
||||||
|
|
||||||
|
- Concatenates the two strings by adding a comma and space between them. |
||||||
|
- Returns the resulting string. |
||||||
|
|
||||||
|
### Usage |
||||||
|
|
||||||
|
Here is an example of how to use the `concat` function: |
||||||
|
|
||||||
|
```python |
||||||
|
import concat_string |
||||||
|
string1 = "Hello" |
||||||
|
string2 = "World" |
||||||
|
print(concat_string.concat(string1, string2)) |
||||||
|
``` |
||||||
|
|
||||||
|
This will output: |
||||||
|
|
||||||
|
```console |
||||||
|
'Hello, World' |
||||||
|
``` |
||||||
|
|
||||||
|
### References |
||||||
|
|
||||||
|
[string concatenation](https://www.w3schools.com/python/ref_string_concatenation.asp) |
Loading…
Reference in new issue