Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Repeat-a-string/Python/repeat-a-string-1.py
Normal file
1
Task/Repeat-a-string/Python/repeat-a-string-1.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
"ha" * 5 # ==> "hahahahaha"
|
||||
1
Task/Repeat-a-string/Python/repeat-a-string-2.py
Normal file
1
Task/Repeat-a-string/Python/repeat-a-string-2.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
5 * "ha" # ==> "hahahahaha"
|
||||
4
Task/Repeat-a-string/Python/repeat-a-string-3.py
Normal file
4
Task/Repeat-a-string/Python/repeat-a-string-3.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
def repeat(s, times):
|
||||
return s * times
|
||||
|
||||
print(repeat("ha", 5))
|
||||
2
Task/Repeat-a-string/Python/repeat-a-string-4.py
Normal file
2
Task/Repeat-a-string/Python/repeat-a-string-4.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
x = lambda a: a * 5
|
||||
print(x("ha"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue