Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = input()
- sub_str = input()
- result = []
- res01 = string.find(sub_str)
- if res01 != -1:
- result.append(str(res01))
- if result:
- start = res01
- temp = 0
- while True:
- start = start + 1
- res02 = string.find(sub_str, start)
- if res02 != -1:
- temp = res02
- if res02 == -1:
- if temp != 0:
- result.append(str(temp))
- break
- if result:
- print(" ".join(result))
- else:
- print("None"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement