Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_sandwich(text):
- if "chleb" in text:
- a = True
- else:
- a = False
- if a == True:
- gdzie_chleb = text.find('chleb')
- text2 = text[gdzie_chleb+5:]
- gdzie_drugi_chleb = text2.find('chleb')
- if gdzie_drugi_chleb == -1:
- print('')
- else:
- print(text[(gdzie_chleb+5):(gdzie_chleb+5+gdzie_drugi_chleb)])
- else:
- print('brak sΕowa chleb')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement