Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Status/Day 3.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,22 @@ def count_letters_digits(counters,char_to_check):
print('LETTERS {0}\nDIGITS {1}'.format(*reduce(count_letters_digits,input(),[0,0])))
```

```python
'''Solution by: Naveen

#using filter function

def check_letter(i):
if i.isalpha():
return i
def check_number(i):
if i.isdigit():
return i

l = list(input())
print("Letter "+ str(len(list(filter(check_letter,l) ) ) ) )
l = list(input())
print("Letter "+ str(len(list(filter(check_letter,l) ) ) ) )
---

## Conclusion
Expand Down