Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check(s):
- ls=0; vyhod="true"
- for i in s:
- if i=='{': ls=ls+1
- if i=='}': ls=ls-1
- if ls!=0: vyhod="false"
- return vyhod
- stroka=input ("ввидите строку:")
- otvet=check(stroka)
- print(otvet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement