why is python string split() not splitting

后端 未结 3 2100
执笔经年
执笔经年 2020-11-27 23:34

I have the following python code.

class MainPage(BaseHandler):

    def post(self, location_id):
        reservations = self.request.get_all(\'reservations\'         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 00:03

    split does not modify the string. It returns a list of the split pieces. If you want to use that list, you need to assign it to something with, e.g., r = r.split(' ').

提交回复
热议问题