Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- test = "bruh--[[ comment ]] lol"
- NewText = ""
- IsComment = False
- for i,v in enumerate(test):
- if (str(test[i:i+1]) == "-") and (str(test[i+1:i+2]) == "-"):
- IsComment = True
- elif (str(test[i-2:i-1]) == "]") and (str(test[i-1:i]) == "]"):
- IsComment = False
- if IsComment == False:
- NewText = NewText + str(v)
- print(NewText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement