Hi,
I'm creating a program that can help me learn my Greek words.
But I need to divide a string in two parts.
To make it more clear, I have this string:
And I want to divide it in:Code:"koeien = cows"
What is the easiest way to do this?Code:"koeien" and "cows"
The only way I can think of is making a list from the string. Indexing the location of the "=". And then doing something like:
There must be an easier way...Code:part1 = list[:indexed_location-1] part2 = list[indexed_location+2:]
Thanks in advance!
Bookmarks