fix minor issues with n_times_string
This commit is contained in:
@@ -5,8 +5,7 @@ tags: string,beginner
|
|||||||
|
|
||||||
Prints out the same string a defined number of times.
|
Prints out the same string a defined number of times.
|
||||||
|
|
||||||
Use this method to print out the same string n number of times.
|
Repeat the string `n` times, using the `*` operator.
|
||||||
|
|
||||||
|
|
||||||
```py
|
```py
|
||||||
def n_times_string(str,n):
|
def n_times_string(str,n):
|
||||||
@@ -16,4 +15,4 @@ def n_times_string(str,n):
|
|||||||
```py
|
```py
|
||||||
n_times_string('py', 4) #'pypypypy'
|
n_times_string('py', 4) #'pypypypy'
|
||||||
|
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user