我正在编写一个小型NLP算法,我需要执行以下操作:
对于列表中的每个字符串x ["this", "this", "and", "that"],如果字符串x和下一个字符串相同,我想打印字符串.
["this", "this", "and", "that"]
x
python string compare list next
compare ×1
list ×1
next ×1
python ×1
string ×1