Skip to content
Open
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
18 changes: 8 additions & 10 deletions Find a string.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Enter your code here. Read input from STDIN. Print output to STDOUT
# Author : Vineet
s1 = str(raw_input())
s2 = str(raw_input())
s1 = str(input())
s2 = str(input())

# print s1.count(s2) -- for non-overlapping sequences
# Below is code for overlapping sequences
cnt = 0

t = 0
for i in range(len(s1)):
if s1[i:].startswith(s2):
cnt += 1
#i += x
print cnt
t=t+1


print(t)