remove unnecessary snippets
This commit is contained in:
@ -1,19 +0,0 @@
|
||||
---
|
||||
title: is_lower_case
|
||||
tags: string,utility,beginner
|
||||
---
|
||||
|
||||
Checks if a string is lower case.
|
||||
|
||||
Convert the given string to lower case, using `str.lower()` and compare it to the original.
|
||||
|
||||
```py
|
||||
def is_lower_case(string):
|
||||
return string == string.lower()
|
||||
```
|
||||
|
||||
```py
|
||||
is_lower_case('abc') # True
|
||||
is_lower_case('a3@$') # True
|
||||
is_lower_case('Ab4') # False
|
||||
```
|
||||
@ -1,19 +0,0 @@
|
||||
---
|
||||
title: is_upper_case
|
||||
tags: string,utility,beginner
|
||||
---
|
||||
|
||||
Checks if a string is upper case.
|
||||
|
||||
Convert the given string to upper case, using `str.upper()` and compare it to the original.
|
||||
|
||||
```py
|
||||
def is_upper_case(string):
|
||||
return string == string.upper()
|
||||
```
|
||||
|
||||
```py
|
||||
is_upper_case('ABC') # True
|
||||
is_upper_case('a3@$') # False
|
||||
is_upper_case('aB4') # False
|
||||
```
|
||||
Reference in New Issue
Block a user