Skip to content

Commit dba18d3

Browse files
Merge pull request #781 from GauravSingh9356/master
Added "binod" detector
2 parents fc01d3f + 1180ee5 commit dba18d3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

binod.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import os
2+
3+
4+
def checkBinod(file):
5+
with open(file, "r") as f:
6+
fileContent = f.read()
7+
if 'binod' in fileContent.lower():
8+
print(
9+
f'**************Congratulations Binod found in {f}********************')
10+
return True
11+
12+
13+
if __name__ == '__main__':
14+
ans = False
15+
print("************binod Detector********************")
16+
dir_contents = os.listdir()
17+
for item in dir_contents:
18+
if item.endswith('txt'):
19+
ans = checkBinod(item)
20+
if(ans is False):
21+
print('Binod not found!')

binod.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I am binod

0 commit comments

Comments
 (0)