Travis build: 159

This commit is contained in:
30secondsofcode
2019-10-13 20:32:12 +00:00
parent 9888f1b462
commit 2cbe9adc97
3 changed files with 57 additions and 0 deletions

View File

@ -123,6 +123,7 @@
* [`kebab`](#kebab)
* [`n_times_string`](#n_times_string)
* [`palindrome`](#palindrome)
* [`reverse_string`](#reverse_string)
* [`snake`](#snake)
* [`split_lines`](#split_lines)
@ -1929,6 +1930,27 @@ palindrome('taco cat') # True
<br>[⬆ Back to top](#contents)
### reverse_string
Returns the reverse of a string.
Use string slicing to reverse the string.
```py
def reverse_string(string):
return string[::-1]
```
<details>
<summary>Examples</summary>
```py
reverse_string("snippet") #"teppins"
```
</details>
<br>[⬆ Back to top](#contents)
### snake
Converts a string to snake case.