Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c41008c

Browse files
Fixing markdown mistakes
There were some code segments for which "Python" had not been specified as the formatting language.
1 parent e9a443f commit c41008c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ To subsitute multiple instances, wrap the right hand side in a Tuple:
161161

162162
You can also do variable subsitutions with a dictionary:
163163

164-
```
164+
```python
165165
>>> dict = { "name": "Mike", "country": "Canada" }
166166
>>> 'I am %(name)s and I am from %(country)s' % dict
167167
'I am Mike and I am from Canada'
@@ -428,7 +428,7 @@ get_vowels('gym') # []
428428

429429
### Length of Last Word in a string
430430
This method gets the length of last word in a given string.
431-
```
431+
```python
432432
def lengthOfLastWord(self, s: str) -> int:
433433
if(s.split()):
434434
lst=s.split()
@@ -438,14 +438,14 @@ def lengthOfLastWord(self, s: str) -> int:
438438
```
439439
### Valid Palindrome
440440
This method returns a bool value specifying whether a string is palindromic or not.
441-
```
441+
```python
442442
def isPalindrome(self, s: str) -> bool:
443443
s = [ x.lower() for x in s if x.isalnum() ]
444444
return s == s[::-1]
445445
```
446446
### Check Lowercase
447447
This method checks if a string is in lower case or not.
448-
```
448+
```python
449449
def toLowerCase(self, str):
450450
"""
451451
:type str: str
@@ -455,7 +455,7 @@ def toLowerCase(self, str):
455455
```
456456
### Count Negatives in a sorted Matrix
457457
This method returns the count of negative numbers in a sorted matrix.
458-
```
458+
```python
459459
def countNegatives(self, grid: List[List[int]]) -> int:
460460
count = 0
461461
for num in grid:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /