removed match to allow older python versions
This commit is contained in:
		
							parent
							
								
									14ac53f4af
								
							
						
					
					
						commit
						59213e8145
					
				@ -10,15 +10,14 @@ def brackets(text):
 | 
			
		||||
    res = 0
 | 
			
		||||
    slash = 0
 | 
			
		||||
    for i in text:
 | 
			
		||||
        match i:
 | 
			
		||||
            case "/":
 | 
			
		||||
        if i == "/":
 | 
			
		||||
            slash += 1
 | 
			
		||||
            if slash == 2:
 | 
			
		||||
                break
 | 
			
		||||
            continue
 | 
			
		||||
            case "{":
 | 
			
		||||
        if i == "{":
 | 
			
		||||
            res += 1
 | 
			
		||||
            case "}":
 | 
			
		||||
        if i == "}":
 | 
			
		||||
            res -= 1
 | 
			
		||||
        slash = 0
 | 
			
		||||
    return res
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user