Python programming problems

    import jieba
    a =""
    -sharp[print(i) for  i  in  jieba.cut(a)]
    cw =jieba.cut(a)
    a=""
    for i in cw:
        i += " "
    print(i)

Why is the result not "I love Tiananmen Square in Beijing" but "Tiananmen Square"?

how do I write the string "I love Beijing Tiananmen" if the effect I come up with is the string "I love Beijing Tiananmen"? I wrote it as below, but there is an extra space at the end. In spite of this, I think the following way of writing is not very beautiful. Ask for a beautiful way?

    a =""
    -sharp[print(i) for  i  in  jieba.cut(a)]
    cw =jieba.cut(a)
    a=""
    for i in cw:
        a +=  i+" "
    print(a)
Apr.15,2021

is there something wrong with the previous code? The for loop is written as I instead of a, so each loop does not keep the last one, and in the end there is only "Tiananmen Square"
. Each time you add a space to the participle in the for loop, there will be an extra space at the end.
graceful way:
I don't know if the return of the jieba participle (that is, the cw variable here) is list,. If so, directly:

' '.join(cw)

can


>>>seg_list=''
>>>print('/'.join(jieba.cut(seg_list,cut_all=False)))

>>>///
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bed9-44e66.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bed9-44e66.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?