-
-
Save lukaszkorecki/344824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // w js nie ma switcha z regexem :-( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| elo = '' | |
| if re.match(r'/zorb/', input): | |
| elo = "shoop de doop" | |
| elif re.match(r'/blomp/', input): | |
| elo "imma chagin mah lazah" | |
| else: | |
| elo = "FIAL" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| elo = case input | |
| when /zorb/ then "shoop de doop" | |
| when /blomp/ then "imma chagin mah lazah" | |
| else "FIAL" | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment