```
class Solution:
# @param s, a string
# @return a list of lists of string
def partition(self, s):
if not s or len(s)==0:
return []
res,temp=[],[]
self.helper(res,temp,s)
return res
def isPalindrome(self,s):
i=0
j=len(s)-1
while i<j:
if s[i]!=s[j]:
return False
i+=1
j-=1
return True
def helper(self,res,temp,s):
if len(s)==0:
res.append(temp[:])
for i in xrange(1,len(s)+1):
if self.isPalindrome(s[:i]):
temp.append(s[:i])
self.helper(res,temp,s[i:])
temp.pop()
```

why I have to write code like res.append(temp[:]) instead of res.append(temp)? What is the difference between temp and temp[:]?