given:
my = 'my name is david'
i would like to make this into a list with 2 values
i would like the list to be:
mylist = ['my name is','david']
so i try using:
mylist = my.split(' ',1)
but i soon find it splits left to right which returns:
mylist = ['my','name is david']
to avoid having to use alot of other code, i am wondering if there is a way to make it split right to left or reverse of the way its splitting?
my = 'my name is david'
i would like to make this into a list with 2 values
i would like the list to be:
mylist = ['my name is','david']
so i try using:
mylist = my.split(' ',1)
but i soon find it splits left to right which returns:
mylist = ['my','name is david']
to avoid having to use alot of other code, i am wondering if there is a way to make it split right to left or reverse of the way its splitting?
Comment