跳至内容
菜单
此问题已终结
1 回复
3028 查看

Example: I have a string "Chicken Wings" and i just the chicken word to display. Thanks in advance    ​

形象
丢弃
最佳答案

Hi,
Try  some_string.split(' ', 1)[0] or some_string.partition(' ')[0] , wheresome_string is your string of field holding the string value. 

Source: https://stackoverflow.com/questions/13750265/how-to-get-the-first-word-in-the-string

Thanks

形象
丢弃