早睡早起,方能养生
Sleep early rise early, way to keep healthy

Python分割字符串 split 用法

super
2022-12-14 23:36
views 1814

Python分割字符串 

 

str = '1-2-3-4-5-6'

print(str.split('-'))
# ['1', '2', '3', '4', '5', '6']

 



分享
0 条讨论
top