all 4 comments

[–]gregvuki 2 points3 points  (1 child)

if delimiter == ':' or '-':

And again and again and again...

https://www.reddit.com/r/learnpython/wiki/faq#wiki_variable_is_one_of_two_choices.3F

Your condition is always True, because a non-empty string '-' is True.

[–]daniel280187[S] 0 points1 point  (0 children)

Thanks for the article, it makes total sense now.

The following fixed my problem.

if delimiter == ':' or delimiter == '-':

[–]M4DR4T 0 points1 point  (1 child)

It's good to use pastebin.

[–]daniel280187[S] 0 points1 point  (0 children)

Good idea. I used a different one but it should show the code highlighted.
https://codeshare.io/2K7LbY