火麒麟打赏完整源码免费下载(火麒麟打赏系统356)
本文目录一览:
python编程,用‘’堆栈‘’写出来,求助编程高手,发源代码给我,有打赏
# -*- coding: utf8 -*-
def match(s):
"""
match('(),')
yes
match('[],')
yes
match('(())')
yes
match('([])')
yes
match('()[]')
yes
match('()[()]')
yes
match('(,')
no
match('[,')
no
match('],')
no
match(')(,')
no
match('([]}')
no
match('([(),')
no
match('{(})')
no
"""
left = ['(','[','{']
right = [')',']','}']
stack = []
flag = 0
for c in s:
if c in left:
stack.append(c)
elif c in right:
if len(stack) 0:
c1 = stack.pop()
else:
flag = 1
break
if right.index(c) != left.index(c1):
flag = 1
break
if len(stack) != 0:
flag = 1
if flag == 1:
print('no')
else:
print('yes')
if __name__ == "__main__":
import doctest
doctest.testmod()
s = input('Input: ')
match(s[0:200])
谁会做网站源码的
技术上的东西还是要请人做的。不过有很多免费源码,你可以借鉴借鉴,说不定就有适合你用的。
518源码资源网
免费下载完整源码。希望对你有用。
乔维安的京洛再无佳人1.2两部的百度云 完整版+番外哟,谢谢啦给打赏
《京洛再无佳人》【精校版】by乔维安.txt下载:
应该是这个没错,希望能采纳满意的话能点赞就更好了。◕‿◕。