Duplicate/mislabeled isdecimal() section
File
30-Days-Of-Python/04_Day_Strings/day_4.py
Description
There's a duplicate and incorrectly labeled isdecimal() section at line 162. It's actually showing find() examples, not isdecimal().
Current content at line 162
# isdecimal(): Checks Decimal Characters
challenge = 'thirty days of python'
print(challenge.find('y')) # 5
print(challenge.find('th')) # 0
Why this is a problem
- This section is labeled
isdecimal() but demonstrates the find() method instead.
find() is already correctly demonstrated earlier, at line 115:
# find(): Returns the index of first occurrence of substring
challenge = 'thirty days of python'
print(challenge.find('y')) # 5
print(challenge.find('th')) # 0
- The correct
isdecimal() example already exists at line 175:
# isdecimal(): Checks decimal characters
num = '10'
print(num.isdecimal()) # True
num = '10.5'
print(num.isdecimal()) # False
Requested change
Could someone remove the duplicate, mislabeled isdecimal() section at line 162? Since find() is already demonstrated at line 115 and the correct isdecimal() example remains at line 175, this section is redundant and should just be deleted to keep each string method example in its appropriate place.
Duplicate/mislabeled
isdecimal()sectionFile
30-Days-Of-Python/04_Day_Strings/day_4.pyDescription
There's a duplicate and incorrectly labeled
isdecimal()section at line 162. It's actually showingfind()examples, notisdecimal().Current content at line 162
Why this is a problem
isdecimal()but demonstrates thefind()method instead.find()is already correctly demonstrated earlier, at line 115:isdecimal()example already exists at line 175:Requested change
Could someone remove the duplicate, mislabeled
isdecimal()section at line 162? Sincefind()is already demonstrated at line 115 and the correctisdecimal()example remains at line 175, this section is redundant and should just be deleted to keep each string method example in its appropriate place.