Duplicate/mislabeled `isdecimal()` section

Author: bravefeCreated Jul 30, 2026Updated Aug 2, 2026

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

  1. This section is labeled isdecimal() but demonstrates the find() method instead.
  2. 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
  1. 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.

Source: Asabeneh/30-Days-Of-Python