Re: [Tutor] Split Method

2014-01-30 Thread Peter Otten
Rafael Knuth wrote: > Hey there, > > I am having some issues with splitting strings. > I already know how to split strings that are separated through empty > spaces: > > def SplitMyStrings(): > Colors = "red blue green white black".split() > return (Colors) > > print(SplitMyStrings()) >

Re: [Tutor] Split Method

2014-01-30 Thread Steven D'Aprano
On Thu, Jan 30, 2014 at 12:11:56PM +0100, Rafael Knuth wrote: > Hey there, > > I am having some issues with splitting strings. > I already know how to split strings that are separated through empty spaces: > > def SplitMyStrings(): > Colors = "red blue green white black".split() > return

[Tutor] Split Method

2014-01-30 Thread Rafael Knuth
Hey there, I am having some issues with splitting strings. I already know how to split strings that are separated through empty spaces: def SplitMyStrings(): Colors = "red blue green white black".split() return (Colors) print(SplitMyStrings()) >>> ['red', 'blue', 'green', 'white', 'blac